SMTP Mail
-
Hi, Can anyone tell me how to send smtp email from my machine.i'm doing it as below .It executes fine but i recieve no email.plz let me know what else i have to do. Dim objMM As New MailMessage() objMM.To = "one_dcsian@yahoo.com" objMM.From = "one_dcsian@yahoo.com" objMM.BodyFormat = MailFormat.Text objMM.Priority = MailPriority.Normal objMM.Subject = "Hello there!" objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?" Dim SmtpMail As Web.Mail.SmtpMail SmtpMail.SmtpServer = "localhost" SmtpMail.Send(objMM) payback
-
Hi, Can anyone tell me how to send smtp email from my machine.i'm doing it as below .It executes fine but i recieve no email.plz let me know what else i have to do. Dim objMM As New MailMessage() objMM.To = "one_dcsian@yahoo.com" objMM.From = "one_dcsian@yahoo.com" objMM.BodyFormat = MailFormat.Text objMM.Priority = MailPriority.Normal objMM.Subject = "Hello there!" objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?" Dim SmtpMail As Web.Mail.SmtpMail SmtpMail.SmtpServer = "localhost" SmtpMail.Send(objMM) payback
Dim SmtpMail As Web.Mail.SmtpMail
My VB.NET is rusty but I don't think you need to do this asSend
is a static method. So you don't need to instantiate the class. In C# I just set the SmtpServer and then use the Send method. If that does not work but without .NET errors then your localhost probably has not been setup correctly. regards, Paul Watson Bluegrass South Africa Chris Maunder wrote: "I'd rather cover myself in honey and lie on an ant's nest than commit myself to it publicly." Jon Sagara replied: "I think we've all been in that situation before." Crikey! ain't life grand? -
Dim SmtpMail As Web.Mail.SmtpMail
My VB.NET is rusty but I don't think you need to do this asSend
is a static method. So you don't need to instantiate the class. In C# I just set the SmtpServer and then use the Send method. If that does not work but without .NET errors then your localhost probably has not been setup correctly. regards, Paul Watson Bluegrass South Africa Chris Maunder wrote: "I'd rather cover myself in honey and lie on an ant's nest than commit myself to it publicly." Jon Sagara replied: "I think we've all been in that situation before." Crikey! ain't life grand? -
ok ur rite. but that was just declaration not instantiation. any way i tried after removing that but nothing.any other suggestion? anyone knows about it??? Best Regards PayBack
There are plenty of articles on it right here on CP and here is one by Isaac Sasson which should help. regards, Paul Watson Bluegrass South Africa Chris Maunder wrote: "I'd rather cover myself in honey and lie on an ant's nest than commit myself to it publicly." Jon Sagara replied: "I think we've all been in that situation before." Crikey! ain't life grand?
-
Hi, Can anyone tell me how to send smtp email from my machine.i'm doing it as below .It executes fine but i recieve no email.plz let me know what else i have to do. Dim objMM As New MailMessage() objMM.To = "one_dcsian@yahoo.com" objMM.From = "one_dcsian@yahoo.com" objMM.BodyFormat = MailFormat.Text objMM.Priority = MailPriority.Normal objMM.Subject = "Hello there!" objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?" Dim SmtpMail As Web.Mail.SmtpMail SmtpMail.SmtpServer = "localhost" SmtpMail.Send(objMM) payback
I use http://sourceforge.net/projects/opensmtp-net/[^] for all my sites. Works great! Rocky <>< www.HintsAndTips.com www.GotTheAnswerToSpam.com