O'Reilly Forums: Sendingmail - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Sendingmail

#1 User is offline   Srinu gandikota 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 24-December 10

Posted 24 December 2010 - 11:52 PM

SmtpClient client = new SmtpClient();
client.Credentials = new NetworkCredential("id", "password");
client.Port = 587;
client.Host = "smtp.gmail.com";
client.EnableSsl = true;


System.Net.Mail.MailMessage msg=new System.Net.Mail.MailMessage();
msg.From = new MailAddress("srinu.gandikota@gmail.com", "GSR",System.Text.Encoding.UTF8);
msg.Attachments.Add(attachment);
msg.Attachments.Add(new Attachment(Server.MapPath("Desert.jpg")));

msg.To.Add("muralialajangi@gmail.com");
msg.CC.Add(“CC address”);
msg.Subject = "mail";
msg.Body = "hi";
msg.Priority = MailPriority.High;
msg.Attachments.Add(new Attachment(Server.MapPath("Desert.jpg")));
msg.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
client.Send(msg);

This post has been edited by Srinu gandikota: 24 December 2010 - 11:56 PM

0

#2 User is offline   NickJohnson 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 24-September 12
  • Gender:Male

Posted 05 November 2012 - 09:15 PM

Hey Srinu gandikota,

Whats the reason of posting this coding?
Whats your question??????
http://www.expertsfromindia.com/html5-designer.htm
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users