PDA

View Full Version : Problem with email


john_a_antoniou
11-13-2004, 05:27 AM
I call this function to send an email.


Can anybody help me?








Public Function sendEmail(ByVal sender As String, ByVal subject As String, ByVal body As String) As Boolean


Dim objMsg As New MailMessage


Dim flag As Boolean


Try


objMsg.To = john_a_antoniou@yahoo.com


objMsg.From = "info@e-blackboard.com"


objMsg.Priority = MailPriority.High


objMsg.Subject = "Testing...."


objMsg.Body = "testing...."


SmtpMail.SmtpServer = "mail.e-blackboard.com"


SmtpMail.Send(objMsg)


flag = True


Catch


flag = False


End Try


Return flag


End Function

Eric
11-13-2004, 07:09 AM
Try this.

Use: localhost
instead of: mail.e-blackboard.com

DiscountASP.NET
http://www.DiscountASP.NET

john_a_antoniou
11-14-2004, 07:59 AM
Thanks. Now it is workinghttp://community.discountasp.net/emoticons/yeah.gif