is there a simple way to send a string to my gmail? ive read a few sources of people doing this but i still dont have a good understanding of how to do this in cpp to a service that has ssl/tls authentication. this is what i found from a old video of him using it with gmail
do you think theres a setting thats not allowing it to go through? i get this error about 3 seconds after i click the button
An unhandled exception of type 'System.Net.Mail.SmtpException' occurred in System.dll
Additional information: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at
and with the port 465 for ssl i get this error about 12 seconds after clicking the button
An unhandled exception of type 'System.Net.Mail.SmtpException' occurred in System.dll
Additional information: Failure sending mail.
i looked up a try/catch block and dont understand where to put certain parts of the code, i see
1 2 3 4 5
try {
// protected code
}catch(...) {
// code to handle any exception
}
would i put what i have above inside of try, and what would go inside the catch when the exception is thrown?
also i just changed it to a clr console application so i dont have to fill in the text boxes each time just to save a little bit of time.
true i forgot about that for the textboxes. heres the error it throws in my console window with port 587
ERROR: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at
heres the error with port 465
ERROR: Failure sending mail.
ssl uses port 465 i think so im assuming thats why port 587 throws the not authenticated error
haha i just tried it with my secondary email as the sender and got a Review blocked sign-in attempt email from google. i think theres a setting i need to disable or allow somewhere, im going to look for that but it was the username, i was using my actual username when it was everything before @gmail
edit: yep that worked, it was because of the username and having the access for less secure apps turned off. thank you very much sir that helped a ton. just need to figure out how come i cant send them from myself to myself but thats not a big deal. i think its because of 2 step verification