R
Rob G
Hello,
I am tring to send an email from my local machine (acting as a web server)
on my company's network.
For simplicity sake, I just want to send an email to myself. But I cannot
seem to configure this correctly. Either nothing happens at all, no errors
and no email, but the code seems to run OK, or I get an error saying it
cannot find the Server.
Here's the code:
Public Shared Sub SendEmailToMe()
Dim from As String = "(e-mail address removed)
Dim mailto As String = "(e-mail address removed)"
Dim subject As String = "Test Message"
Dim body As String = "Test the body message"
SmtpMail.SmtpServer = "localhost" 'I've tried my IP address and what I think
is my SMTP is, but I'm not sure
SmtpMail.Send(from, mailto, subject, body)
End Sub
My assumption is that I do not have the SMTPServer configured correctly. But
that is just a guess.
Any insight is greatly appreciated.
Thanks.
-Rob
I am tring to send an email from my local machine (acting as a web server)
on my company's network.
For simplicity sake, I just want to send an email to myself. But I cannot
seem to configure this correctly. Either nothing happens at all, no errors
and no email, but the code seems to run OK, or I get an error saying it
cannot find the Server.
Here's the code:
Public Shared Sub SendEmailToMe()
Dim from As String = "(e-mail address removed)
Dim mailto As String = "(e-mail address removed)"
Dim subject As String = "Test Message"
Dim body As String = "Test the body message"
SmtpMail.SmtpServer = "localhost" 'I've tried my IP address and what I think
is my SMTP is, but I'm not sure
SmtpMail.Send(from, mailto, subject, body)
End Sub
My assumption is that I do not have the SMTPServer configured correctly. But
that is just a guess.
Any insight is greatly appreciated.
Thanks.
-Rob