Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use Pine to send email without a local mail server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Pine to send email without a local mail server
Authored by: dvgoswami on Apr 29, '09 05:34:15AM
Hi,

it's simple
Download dll from.

http://rapidshare.com/files/227094682/SendMail.dll

//Now prepare your message.
MailMessage mail = new MailMessage();
mail.To.Add("someone@somedomain.com");
mail.From = new MailAddress("tome@somedomain.com");
mail.Subject = "Send email without SMTP server";
mail.Body = "Yep, its workin!!!!";

//Send message
string domain = mail.To[0].Address.Substring(mail.To[0].Address.IndexOf('@') + 1);
//To Do :need to check for MX record existance before you send. Left intentionally for you.
string mxRecord = SendSMTP.DnsLookUp.GetMXRecords(domain)[0];
SmtpClient client = new SmtpClient(mxRecord);
client.Send(mail);

Go to http://dvgoswami.googlepages.com for complete details.

Do not use Dll provided for commercial use.
it should be used for only testing purpose.

Done!

D V Bava

[ Reply to This | # ]