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
48
votes
12 answers

Sending email via Node.js using nodemailer is not working

I've set up a basic NodeJS server (using the nodemailer module) locally (http://localhost:8080) just so that I can test whether the server can actually send out emails. If I understand the SMTP option correctly (please correct me if I'm wrong), I…
Kawd
  • 4,122
  • 10
  • 37
  • 68
48
votes
12 answers

How can I send emails through SSL SMTP with the .NET Framework?

Is there a way with the .NET Framework to send emails through an SSL SMTP server on port 465? The usual way: System.Net.Mail.SmtpClient _SmtpServer = new System.Net.Mail.SmtpClient("tempurl.org"); _SmtpServer.Port = 465; _SmtpServer.EnableSsl =…
Idriss
  • 939
  • 1
  • 9
  • 16
47
votes
7 answers

Sendmail Errno[61] Connection Refused

I've been trying to get my application to mail some outputted text to an email. For simplification I have isolated the script : import smtplib import sys import os SERVER = "localhost" FROM = os.getlogin() TO = [raw_input("To : ")] SUBJECT =…
Tehnix
  • 2,020
  • 2
  • 18
  • 23
46
votes
3 answers

STARTTLS vs SSL/TLS

Mailclients offer both settings, the STARTTLS and SSL/TLS. What is the difference between STARTTLS and SSL/TLS?
paweloque
  • 18,466
  • 26
  • 80
  • 136
43
votes
1 answer

MIMEMultipart, MIMEText, MIMEBase, and payloads for sending email with file attachment in Python

Without much prior knowledge of MIME, I tried to learned how to write a Python script to send an email with a file attachment. After cross-referencing Python documentation, Stack Overflow questions, and general web searching, I settled with the…
Ken Lin
  • 986
  • 1
  • 8
  • 22
43
votes
9 answers

A simple SMTP server (in Python)

Could you please suggest a simple SMTP server with the very basic APIs (by very basic I mean, to read, write, delete email), that could be run on a linux box? I just need to convert the crux of the email into XML format and FTP it to another…
fixxxer
  • 15,568
  • 15
  • 58
  • 76
43
votes
1 answer

How to send email via smtp with Ruby's mail gem?

I am using the mail gem for Ruby https://github.com/mikel/mail How do I send an email via an smtp server? How do I specify the address and port? And what settings should I use for Gmail? The README on github only gives examples sending by a local…
Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
43
votes
7 answers

How can I use a local SMTP server when developing on Windows 7?

How can I get SMTP to work on a Windows 7 development box? I used to just be able to turn on the IIS SMTP server on Windows XP. Is SMTP not included with Windows 7? If so, what can I use instead as a free relay mechanism?
JoeLangley
  • 435
  • 1
  • 4
  • 5
42
votes
3 answers

Dummy SMTP server for development purposes

I've been using a dummy smtp server called DevNull SMTP so that I can test my app which sends out notification emails. It has a nice simple GUI, very helpful, but can't be scripted easily. I can't even start it listening to port 25. I have to run…
at.
  • 50,922
  • 104
  • 292
  • 461
42
votes
5 answers

Reading email (from gmail) in emacs 24

What's the current authoritative way to check and send email in emacs 24? I've checked the following SO links: Setup for Gmail in Emacs VM https://superuser.com/questions/476714/how-to-configure-emacs-smtp-for-using-a-secure-server-gmail Which…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
42
votes
7 answers

Too many DNS lookups in an SPF record

My website needs to send out emails with Google Apps, SendGrid and MailChimp services. Google Apps is used to receive and read incoming email to my domain. I need to set the SPF record for my domain. The following is syntactically correct (not sure…
Robert
  • 559
  • 1
  • 4
  • 6
40
votes
2 answers

Is SMTP based on TCP or UDP?

Is SMTP based on TCP or UDP ? I really can't confirm it . In my opinion, SMTP should be based on UDP, but someone told me that is must be TCP.
Jerry Cai
  • 571
  • 2
  • 8
  • 18
39
votes
8 answers

Django sending email

I know there are 20 questions similar to mine but I've tried for over a day now to get email to work with Django. I'm getting this error: [Errno 111] Connection refused when I attempt to send an email This is where I create the email and attempt to…
Luke
  • 2,053
  • 1
  • 18
  • 25
39
votes
8 answers

Setting multiple SMTP settings in web.config?

I am building an app that needs to dynamically/programatically know of and use different SMTP settings when sending email. I'm used to using the system.net/mailSettings approach, but as I understand it, that only allows one SMTP connection…
alphadogg
  • 12,762
  • 9
  • 54
  • 88
39
votes
8 answers

Rails Mailer "Net::OpenTimeout: execution expired" Exception on production server only

I am using Ruby MRI 2.0.0 and Rails 3.2.12 on a Ubuntu 12.04 TLS VPS and attempting to setup email notifications in my app. It was working fine a few days ago, but not anymore. My web host is OVH. My SMTP…