i am trying to send a mail from an asp.net page this is what i did code wise
Code:
MailMessage mailMessage;
mailMessage = new MailMessage();
//set properties
mailMessage.To = "mail1@yahoo.com";
mailMessage.From ="mail1_Test@Keroed_corp.com";
//If you want to CC this email to someone else...
mailMessage.Cc = "mail2@hotmail.com";
//If you want to BCC this email to someone else...
mailMessage.Bcc = "mailingKE@gmail.com";
//Send the email in text format
//(to send HTML format, change MailFormat.Text to MailFormat.Html)
mailMessage.BodyFormat = MailFormat.Text;
//Set the priority - options are High, Low, and Normal
mailMessage.Priority = MailPriority.Normal;
//set subject
mailMessage.Subject ="Test Mail";
//set body
string bodyText ="Testing send Mail" + Environment.NewLine + "Hopefull this works";
mailMessage.Body = bodyText;
//set smtp mail server
SmtpMail.SmtpServer = "";
//send mail
SmtpMail.Send(mailMessage);
i this works because when i go into C:\Inetpub\mailroot\Queue i see the mails that the page tried to send so i am wondering if i need to do some further configuring to my smtp server in IIS