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

10906 questions
911
votes
22 answers

Sending email in .NET through Gmail

Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show. Is it possible to do it?
Mike Wills
  • 19,825
  • 26
  • 87
  • 143
395
votes
14 answers

Send email using the GMail SMTP server from a PHP page

I am trying to send an email via GMail's SMTP server from a PHP page, but I get this error: authentication failure [SMTP: SMTP server does no support authentication (code: 250, response: mx.google.com at your service, [98.117.99.235] SIZE 35651584…
skb
  • 28,056
  • 29
  • 91
  • 140
344
votes
5 answers

Are email addresses case sensitive?

I've read that by standard first part of e-mail is case sensitive, however I've tried to send e-mail to name@example.com, Name@example.com and NAME@example.com - it has arrived in each case. How do mail servers handles usernames? Is it possible to…
Stalker
  • 3,691
  • 2
  • 17
  • 18
304
votes
14 answers

How to send an email with Gmail as provider using Python?

I am trying to send email (Gmail) using python, but I am getting following error. Traceback (most recent call last): File "emailSend.py", line 14, in server.login(username,password) File "/usr/lib/python2.5/smtplib.py", line 554, in…
Mahori
  • 3,977
  • 3
  • 15
  • 26
282
votes
25 answers

Gmail Error :The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required

I am using following code to send email. The Code works correctly in my local Machine. But on Production server i am getting the error message var fromAddress = new MailAddress("mymailid@gmail.com"); var fromPassword = "xxxxxx"; var toAddress = new…
vcs
  • 3,379
  • 3
  • 14
  • 15
260
votes
6 answers

What is the difference between ports 465 and 587?

These ports 465 and 587 are both used for sending mail (submitting mail) but what is the real difference between them?
Ilia Rostovtsev
  • 12,128
  • 10
  • 47
  • 80
254
votes
29 answers

Sending email through Gmail SMTP server with C#

For some reason neither the accepted answer nor any others work for me for "Sending email in .NET through Gmail". Why would they not work? UPDATE: I have tried all the answers (accepted and otherwise) in the other question, but none of them work. I…
CVertex
  • 17,451
  • 27
  • 88
  • 124
243
votes
21 answers

"The remote certificate is invalid according to the validation procedure." using Gmail SMTP server

I'm getting this error: The remote certificate is invalid according to the validation procedure. whenever I try to send e-mail using Gmail's SMTP server in my C# code. Can someone point me to the right direction for a solution to this problem? The…
Josh
  • 12,636
  • 28
  • 109
  • 157
236
votes
13 answers

How to send email to multiple recipients using python smtplib?

After much searching I couldn't find out how to use smtplib.sendmail to send to multiple recipients. The problem was every time the mail would be sent the mail headers would appear to contain multiple addresses, but in fact only the first recipient…
user1148320
  • 2,361
  • 2
  • 12
  • 3
229
votes
6 answers

How can I set the Sender's address in Jenkins?

I'm sending mail from Jenkins to an anonymous SMTP relay internally. That relay then securely sends mail to exchange online via TLS on port 587. The transport works perfectly, the issue is that Microsoft requires the Sender address match the…
CTOMarc
  • 2,329
  • 2
  • 12
  • 4
168
votes
4 answers

What is the behavior difference between return-path, reply-to and from?

On our mailing application we are sending emails with the following header: FROM: marketing@customer.com TO: subscriber1@domain1.com Return-PATH: bouncemgmt@ourcompany.com The problem that we are facing is that some email servers will bounce back a…
Geo
  • 8,329
  • 13
  • 61
  • 90
162
votes
12 answers

How to send email via Django?

In my settings.py, I have the following: EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # Host for sending e-mail. EMAIL_HOST = 'localhost' # Port for sending e-mail. EMAIL_PORT = 1025 # Optional SMTP authentication information…
Derek
  • 10,866
  • 24
  • 87
  • 149
161
votes
9 answers

Mail multipart/alternative vs multipart/mixed

When creating email messages you are supposed to set the Content-Type to multipart/alternative when sending HTML and TEXT or multipart/mixed when sending TEXT and attachments. So what do you do if you want to send HTML, Text, and attachments? Use…
Xeoncross
  • 50,836
  • 73
  • 238
  • 351
154
votes
9 answers

Getting error while sending email through Gmail SMTP - "Please log in via your web browser and then try again. 534-5.7.14"

I'm having problems with gmail smtp server. I already read many posts here in StackOverflow about that subject. The best post I found about test the connection is this one. Although it is very well explained the error I'm getting I couldn't find a…
ppalmeida
  • 2,614
  • 5
  • 18
  • 24
144
votes
3 answers

What's the difference between Sender, From and Return-Path?

What's the difference between an email Sender, From and Return-Path value? Example: I have a contact form where the user can input their email, would this be assigned to sender, from or return-path? I had a quick search on the StackOverflow and…
The Pixel Developer
  • 12,693
  • 9
  • 40
  • 59
1
2 3
99 100