Hi,
Can anybody update me how to send emails using Asp.net?
Can anybody update me how to send emails using Asp.net?
'Create an instance of the MailMessage class Dim objMM as New MailMessage(); 'Set the properties 'Provide the recipient address objMM.To = "recipient@someone.com" 'Provide your address objMM.From = "myaddress@mydomain.com" 'If you want to CC this email to someone then provide it over here objMM.Cc = "someone@someaddress.com" 'If you want to BCC this email to someone then provide it over here objMM.Bcc = "someone2@someaddress2.com" 'Send the email in text format '(to send HTML format, change MailFormat.Text to MailFormat.Html) objMM.BodyFormat = MailFormat.Text 'Set the priority - options (High, Low, and Normal) objMM.Priority = MailPriority.Normal 'Set the subject objMM.Subject = "Hello there!" 'Set the body objMM.Body = "Hi, How are you doing?" 'Now, to send the message, use the Send method of the SmtpMail class SmtpMail.Send(objMM)
See our Cookie Policy
We use cookies to make your online experience easier and better. You consent to this by clicking on "I Agree" or by continuing your use of this website. For more information, See our Privacy Policy.
Comment