[Request] Gmail eMail Sending Source Code

Posts 1–6 of 6 · Page 1 of 1
[Request] Gmail eMail Sending Source Code
the codes im using now is obselete,

i always get the authentication error,

so any1 has working code for gmail email sending?
You cannot use Gmail, it has nothing to do with the code, has to do with using relay's, almost know popular email will allow the use of relays anymore.

Your settings
Pop.gmail.com
smtp.gmal.com
securessl
Port - 995
port 465

But does not matter anymore.

Your best bet is to use outlook controls or a email provider who allows relays
im using gmail for sending emails through my app o__O just need an account and the ability to understand the system.net.mail stuff(might not be system.net.mail, I dont code VB and its been some time I last used it in c#)
What are you using for Client Port? 587?
using System.Net.Mail;

then stick this under a button:

Code:
            MailMessage message = new MailMessage(); //new message

            message.From = new MailAddress("youremail@gmail.com"); //your email
            message.To.Add(new MailAddress("victimsemail@wtfbbq.com")); //victims email

            message.Subject = "The subject"; // subject
            message.Body = "The content of the email"; // content
            SmtpClient client = new SmtpClient(); // create a new smtp client
            client.Host = "smtp.gmail.com"; // gmail smtp server
            client.Port = 587; //gmail smtp port
            client.EnableSsl = true; //gmail smtp requires Ssl to be enabled
            client.UseDefaultCredentials = false; // do not use the default credentials
            client.Credentials = new System.Net.NetworkCredential("youremail@gmail.com", "yourpassword"); // the credentials it should use to log in
            client.Send(message); //send the mail
its C# but converting it shouldnt be a problem unless you're a complete failure
So client port is 567, I'm one to admit when I'm wrong, but didn't google close port 567, indefinitely

I thought they stopped relays altogether because of all the gmail smtp relay spammers that exist, if you run a 3rd party created software which uses port 576 (you should, unless it has changed) get a authentication error.

But again, I could be wrong, this was about a year or so ago

If the code works, it would be

Converted From Hell_Demons' C Code
Code:
Dim message As New MailMessage()
Message.From = New MailAddress("youremail@gmail.com")
Message.[To].Add(New MailAddress("victimsemail@wtfbbq.com"))
Message.Subject = "The subject"
Message.Body = "The content of the email"
Dim client As New SmtpClient()
Client.Host = "smtp.gmail.com"
client.Port = 587
client.EnableSsl = True
client.UseDefaultCredentials = False
client.Credentials = New System.Net.NetworkCredential("youremail@gmail.com", "yourpassword")
client.Send(message)
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?