IssueManager 3.0
IssueManager Enhanced 3.0
VCalendar

News 
Patches available in Downloads 9/5/2006

Subscribe
for notifications about new releases
(of all our apps)
Email


Wordpress themes


Design awesome Wordpress
themes & professional
Website templates.
www.Artisteer.com

Email Notifications Failing - Vista
Author Guy Posting date 5/28/2009 9:49:23 AM
Figured out how to post the code:

I am running vcalendar on my home computer with Vista. Vista does not come with SMTP and it is not an install option either. I contacted UltraApps support to find out what to

do and got the below response:
******************
Hello,
This applies to the .NET 2.0 version running on Vista. This may work on other Windows platforms.

Please refer to this article or similar articles:
weblogs.asp.net/steveschofield/archive/2006/12/19/iis7-post-23-vista-and-smtp-server-where-is-it.aspx

Best regards,
George
******************

So I went to the link and then tried installing the smtp servers suggested but that didn't work for me. I have a dynamic IP address and if I try to send via CDO the mail gets

rejected by the major carriers, e.g. - yahoo, hotmail, gmail, etc.

So, I moved on to the next step of trying rewrite the code to use Vista Smarthost. I amended the common_functions.cs file as below:

Starting at line 607:
(I just struck out this section)
//System.Web.Mail.MailMessage message = new System.Web.Mail.MailMessage();
//message.From = email_from;
//message.To = email_to;
//message.Subject = email_Subject;
//message.Body = email_body;
//message.BodyFormat = 0;
//System.Web.Mail.SmtpMail.Send(message);
//create the mail message

(Here is what I added in place of the above)

MailMessage mail = new MailMessage();

//set the addresses
mail.From = new System.Net.Mail.MailAddress(email_from);
mail.To.Add(email_to);

//set the content
mail.Subject = email_Subject;
mail.Body = email_body;
mail.IsBodyHtml = true;

//send the message
SmtpClient smtp = new SmtpClient("smtp-server.austin.rr.com");

//to authenticate we set the username and password properites on the SmtpClient
smtp.Credentials = new NetworkCredential("email@email.com", "password");
smtp.Send(mail);

I got the basic of the code by going to UltraApps FAQ page www.ultraapps.com/faq.php?app_id=19 and then following the link under the I cannot get email notifications

sent... section. You will need to follow the systemnetmail.com link not the other one.

What the above does is send the mail using vista iis7 smarthost which relays the email through your choosen SMTP server. I now can properly generate and send all necessary

emails. 

Replies
No replies

Post reply
Author *
Topic *
Message *

   Visit our sponsors:
Visual PHP and Web Development, Web Reporting