Connecting to smtp.gmail.com via command line

Using Linux or OSx, do what Sorin recommended but use port 465 instead. 25 is the generic SMTP port, but not what GMail uses. Also, I don’t believe you want to use -starttls smtp openssl s_client -connect smtp.gmail.com:465 You should get lots of information on the SSL session and the response: 220 mx.google.com … Type … Read more

How to figure out the SMTP server host? [closed]

this really is a question for Serverfault. Windows: Open up a command prompt (CMD.exe) Type nslookup and hit enter Type set type=MX and hit enter Type the domain name and hit enter, for example: google.com The results will be a list of host names that are set up for SMTP Linux: Open a command prompt … Read more

Sending email fails when two factor authentication is on for Gmail

Create a custom app in you Gmail security settings. Log-in into Gmail with your account Navigate to https://security.google.com/settings/security/apppasswords In ‘select app’ choose ‘custom’, give it an arbitrary name and press generate It will give you 16 chars token. Use the token as password in combination with your full Gmail account and two factor authentication will … Read more

Security risk of POP before SMTP

For starters, everyone behind a common NAT gateway will be authorized to send mail as the client that initiated the POP before SMTP, as it just means “IP x.x.x.x has sucessfully authorized, they may send mail now” and all clients behind the NAT will appear with the same IP. Potentially, this might mean 1000s of … Read more

What is the best method for sending email on behalf of my clients’ domains?

Excellent question. I’ve just spent several hours researching the same thing. I had previously deployed numerous websites that use Option C for email forms (mainly out of naivety), but we are experiencing an increasing number of delivery issues. Email providers are gradually tightening up on things. For example Yahoo recently changed their DMARC policy to … Read more

What is preferable, “no-reply@” or “noreply@”? [closed]

Either is completely acceptable so long as you configure the basics (DNS, SPF, DKIM is a good idea… etc). Make sure your software properly responds to 4xx and 5xx errors. Spam filtering rarely considers the e-mail address, except upon repeat messages (keeping track of “reputation” so to say). Side note: in geekier communities I’ve seen … Read more

Getting error while sending email through Gmail SMTP – “Please log in via your web browser and then try again. 534-5.7.14” [closed]

I know this is an older issue, but I recently had the same problem and was having issues resolving it, despite attempting the DisplayUnlockCaptcha fix. This is how I got it alive. Head over to Account Security Settings (https://www.google.com/settings/security/lesssecureapps) and enable “Access for less secure apps”, this allows you to use the google smtp for … Read more

Send an email with an attached file using telnet or netcat

Okay, so using everyone’s comments as a starting point I came up with this silly mess 🙂 … { sleep 5; echo ‘ehlo’; sleep 3; echo ‘MAIL FROM:<Test@test.com>’; sleep 3; echo ‘RCPT TO: <kyle@test_dest.com>’; sleep 3; echo ‘DATA’; sleep 3; echo -e ‘To:kyle@testdest.com\nMIME-Version: 1.0 (mime-construct 1.9)\nContent-Type: application/zip\nContent-Transfer-Encoding: base64\n\n’; dd if=/dev/urandom bs=4 count=10 2>/dev/null | openssl … Read more