Questions tagged [smtp]

Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail (e-mail) transmission across Internet Protocol (IP) networks.

SMTP was first defined by RFC 821 (1982, eventually declared STD 10), and last updated by RFC 5321 (2008) which includes the extended SMTP (ESMTP) additions, and is the protocol in widespread use today. SMTP is specified for outgoing mail transport and uses TCP port 25. The protocol for new submissions is effectively the same as SMTP, but it uses port 587 instead. SMTP connections secured by SSL are known by the shorthand SMTPS, though SMTPS is not a protocol in its own right.

RFC 5321 governs the network protocol for transport of mail messages between servers. You might also want to look at RFC5322, which lays out the fundamental message format. Note that it has been extended by numerous additions, most notably the MIME facilities and various amendments for internationalization support.

While electronic mail servers and other mail transfer agents use SMTP to send and receive mail messages, user-level client mail applications typically only use SMTP for sending messages to a mail server for relaying. For receiving messages, client applications usually use either the Post Office Protocol (POP, ) or the Internet Message Access Protocol (IMAP, ) or a proprietary system (such as Microsoft Exchange or Lotus Notes/Domino) to access their mail box accounts on a mail server.

Useful links

11945 questions
38
votes
2 answers

How to do a web.config transform for smtp?

I have this in my root web.config
chobo2
  • 83,322
  • 195
  • 530
  • 832
38
votes
3 answers

How to set up Airflow Send Email?

I followed online tutorial to set up Email SMTP server in airflow.cfg as below: [email] email_backend = airflow.utils.email.send_email_smtp [smtp] # If you want airflow to send emails on retries, failure, and you want to use # the…
Peter Cui
  • 419
  • 1
  • 4
  • 8
38
votes
4 answers

How to configure SMTP settings in web.config

I'm trying to fix an email issue with an inherited website and don't have access to the code (i.e. just the compiled files). This site needs to be hosted on a new web server having a different SMTP server. Upon decompiling bits of the code I can see…
rumi
  • 3,293
  • 12
  • 68
  • 109
38
votes
11 answers

Rails ActionMailer with multiple SMTP servers

I have a need to use two different smtp servers in a Rails application. It appears that the way ActionMailer is constructed, it is not possible to have different smtp_settings for a subclass. I could reload the smtp settings for each mailer class…
user189053
37
votes
4 answers

Amazon Simple Email Service (SES) - Should I use SMTP Interface or SES API?

I'm new to Amazon SES and I see that there are two ways to programmatically send emails: SES API (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-api.html) SES SMTP Interface…
AlexG
  • 1,596
  • 2
  • 17
  • 26
37
votes
5 answers

fgets() and fread() - What is the difference?

I understand the differences between fgets() and fgetss() but I don't get the difference between fgets() and fread(), can someone please clarify this subject? Which one is faster? Thanks!
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
37
votes
5 answers

Gmail: 530 5.5.1 Authentication Required. Learn more at

This Go program successfully sends email from my home computer, but on a virtual server on DigitalOcean receives the following error: panic: 530 5.5.1 Authentication Required. Learn more at Here's the code: auth := smtp.PlainAuth("",…
Calder
  • 2,219
  • 1
  • 20
  • 21
37
votes
7 answers

development smtp server for windows

I am looking for a free test smptp server which can save emails in to files for my development tests. Since my development environment is windows I prefer test email server to run on windows but I can consider to install any other linux based…
Tolga
  • 1,307
  • 3
  • 16
  • 31
37
votes
3 answers

Amazon EC2/SES SMTP Timeout

I have an issue when trying to send emails from my EC2 instance using SMTP to SES. For some reason I am getting sporadic timeout issues, where I can no longer contact the SMTP host. It is important to note that sending through SES works probably…
fattastic
  • 927
  • 1
  • 7
  • 10
36
votes
4 answers

Mac OS X 10.10 Yosemite Postfix SASL authentication failed

I followed the step described in the link below to setup my mac to send out email. http://www.anujgakhar.com/2011/12/09/using-macosx-lion-command-line-mail-with-gmail-as-smtp/ It was working fine on my Mac OS X 10.9. But after I upgraded to OS X…
TFS
  • 964
  • 1
  • 9
  • 19
35
votes
3 answers

How to send a mail directly to SMTP server without authentication?

I would like to send an email directly from a script to a Gmail email account, by connecting directly to smtp.gmail.com. However, I would prefer not to have the gmail password in the script. From what I have read, it appears that Gmail requires…
janak
  • 353
  • 1
  • 3
  • 4
35
votes
3 answers

Attach a txt file in Python smtplib

I am sending a plain text email as follows: import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText def send_message(): msg = MIMEMultipart('alternative') s = smtplib.SMTP('smtp.sendgrid.net',…
David542
  • 104,438
  • 178
  • 489
  • 842
35
votes
4 answers

Any suggestion for smtp mail server in nodejs?

I googled out quite a few but all are at best alpha versions, so it seems I will have to try an code one. Instead of coding one from scratch I would like to build on existing implementation, but a good one. Any suggestions?
AppleGrew
  • 9,302
  • 24
  • 80
  • 124
35
votes
2 answers

What is the proper way to ACTUALLY SEND mail from (Python) code?

Disclaimer: I hesitated on the title, due to the broad nature of this question (see below), other options included: How to send a mail from localhost, using Python code only? How to send email from Python code, without usage of external SMTP…
user8554766
35
votes
4 answers

How to send email with PowerShell

I'd like to send email from PowerShell, so I use this command: $EmailFrom = "customer@yahoo.com" $EmailTo = "receiver@ymail.com" $Subject = "today date" $Body = "TODAY SYSTEM DATE=01/04/2016 SYSTEM TIME=11:32:05.50" $SMTPServer =…
Jessica
  • 461
  • 1
  • 4
  • 7