hendrix500
asked on
Emailing from VB.NET APP
Hi everyone.
I have a problem sending emails from my vb.net program. It is fine sending to email address's on our domain, but doesn't work if I try and send to an external address e.g. hotmail account. No error is reported, the email is just never recieved.
Code is as follows:
Dim Message As New System.Web.Mail.MailMessag e
With Message
.To = "<myexternaladdress@hotmai l.co.uk>"
.From = "<myapp@mydomain.co.uk>"
.Body = "My test mail"
.Subject = "My subject"
End With
Dim MailServer As System.Web.Mail.SmtpMail
MailServer.SmtpServer = "555.555.555.5" 'IP of my exchange server (version 5.5 sp2)
MailServer.Send(Message)
Any help would be great
Thanks
I have a problem sending emails from my vb.net program. It is fine sending to email address's on our domain, but doesn't work if I try and send to an external address e.g. hotmail account. No error is reported, the email is just never recieved.
Code is as follows:
Dim Message As New System.Web.Mail.MailMessag
With Message
.To = "<myexternaladdress@hotmai
.From = "<myapp@mydomain.co.uk>"
.Body = "My test mail"
.Subject = "My subject"
End With
Dim MailServer As System.Web.Mail.SmtpMail
MailServer.SmtpServer = "555.555.555.5" 'IP of my exchange server (version 5.5 sp2)
MailServer.Send(Message)
Any help would be great
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Both answers were correct. I awarded slighlty in favour of emoreau because of the suggestion to install a SMTP server.
Thanks alot to both
Thanks alot to both
ASKER