Permit2kill
Member
- Joined
- Jun 25, 2007
- Messages
- 21
- Programming Experience
- Beginner
I hope this is the right section, if not I apologize
Anyways, basically I've been trying to set up a program that sends emails to my email: jdude77@hotmail.com
I've been trying to use the System.Net.Mail resource and then using the SMTPClient class to send my mail.
The problems I'm running into is when I go to send the mail I get an error message reading "Failure sending mail".
I'm trying to use someone else's SMTP server, and I'm not even sure if this is allowed. If not, is there anyway at all that I can use someone else's SMTP server (ie. gmail or hotmail's) to send mails?
My code is:
The IP address (209,85.199.111) is from smtp.gmail.com.
Anyways, basically I've been trying to set up a program that sends emails to my email: jdude77@hotmail.com
I've been trying to use the System.Net.Mail resource and then using the SMTPClient class to send my mail.
The problems I'm running into is when I go to send the mail I get an error message reading "Failure sending mail".
I'm trying to use someone else's SMTP server, and I'm not even sure if this is allowed. If not, is there anyway at all that I can use someone else's SMTP server (ie. gmail or hotmail's) to send mails?
My code is:
VB.NET:
Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Test As New SmtpClient
Test.Host = "209.85.199.111"
Test.Send("jdude77@hotmail.com", "jdude77@hotmail.com", "Test Email", "This is a test email")
End Sub
End Class