How to write the code for sending mail in asp.net??
I want to send a job description to friend mail through my mail id,but I should enter from email id and to email id in runtime only, and job description content I should get in when I click on Email to a friend button.How to write the code in easy?can any one help me out
Keertti Raj Thangavelu BabuPosted Mar 16, 2015, 5:13 AM
You should set the values to oField Variable .Please go through the link
http://support.microsoft.com/en-us/kb/310212
-----------------------------------------------------------------------------------------------
If this one , helps you then click as "Accept answer" :)
Usha RajPosted Mar 16, 2015, 1:50 AM
CDO.Message oMsg = new CDO.Message();
CDO.IConfiguration iConfg;
iConfg = oMsg.Configuration;
ADODB.Fields oFields;
oFields = iConfg.Fields;
ADODB.Field oField = oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"]; oFields.Update();
oMsg.Subject = "Test CDO";
oMsg.From = "xxx.com";
oMsg.To = "vyyy.com";
oMsg.TextBody = "CDO Mail test";
oMsg.Send();
but am getting the error like The "SendUsing" configuration value is invalid.
Keertti Raj Thangavelu BabuPosted Mar 16, 2015, 1:29 AM
I saw your attachment. Please go through the link.This link describes with from and to address
http://stackoverflow.com/questions/449887/sending-e-mail-using-c-sharp
Usha RajPosted Mar 16, 2015, 12:59 AM
Manpreet SinghPosted Mar 13, 2015, 4:48 PM
Use Smtp Client Model.Here is the link.
Url :- https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient(v=vs.110).aspx
Cheers,
Manpreet
Usha RajPosted Mar 6, 2015, 7:18 AM
Vijay SaklaniPosted Mar 6, 2015, 7:12 AM
please go through the link:
http://www.articlemirror.in/2013/04/how-to-send-e-mail-in-aspnet-using.html
Prasham SabadraPosted Mar 6, 2015, 1:14 AM
Please have a look at following links once
http://www.aspdotnet-suresh.com/2010/12/how-to-send-mail-with-attachment-in.html
https://support.microsoft.com/kb/310273?wa=wsignin1.0