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
35
votes
5 answers

Check mail is sent successfully or not on Laravel 5

I have a function that can send mail on Laravel5 using this /** * Send Mail from Parts Specification Form */ public function sendMail(Request $request) { $data = $request->all(); $messageBody = $this->getMessageBody($data); …
Goper Leo Zosa
  • 1,185
  • 3
  • 15
  • 33
35
votes
10 answers

Setting up a no-reply email address with Google Apps

I have my domain's email set up with Google Apps, and I am interested in sending automated emails (when users register, for example) with the From and/or Reply-To field being "no-reply@example.com". I have a few questions pertaining to how this is…
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218
35
votes
7 answers

EmailBackend for sending email through multiple SMTP in Django

Getting Django to send an email is nicely explained here using standard settings as shown below. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = "mail.mysmtpserver.somewhere" #EMAIL_PORT EMAIL_HOST_USER =…
Tommy Strand
  • 1,384
  • 2
  • 14
  • 15
34
votes
8 answers

Amazon SES SMTP with Django

I'm trying to use Amazon's new SMTP service for SES with Django 1.3.1 but I'm not having much luck. I've created my SES SMTP credentials and have this in my settings: EMAIL_USE_TLS = True EMAIL_HOST =…
GivP
  • 2,634
  • 6
  • 32
  • 34
34
votes
5 answers

Mandrill Emails not reaching any mailbox, but Mandrill showing status 'Delivered'

Mandrill does not offer any support. I've sent them many tickets, but still no answer. I hope someone here will help me out. I'm sending emails through SMTP. I'm able to send few thousand emails in start, but after few thousands, no email reaching…
Pasco
  • 471
  • 1
  • 5
  • 5
34
votes
6 answers

Laravel default mail not working

Im attempting to send a user activation email upon registration. I have a simple laravel site with registration and authentication. Upon registration, there are no errors, and the data is stored correctly, however the email never actually gets sent.…
Sainath Krishnan
  • 2,089
  • 7
  • 28
  • 43
34
votes
8 answers

problem with php mail 'From' header

I'm building a website that sends and email to a user when he registers. My code (the gist of it):
jrharshath
  • 25,975
  • 33
  • 97
  • 127
34
votes
2 answers

No attribute 'SMTP', error when trying to send email in Python

I am trying to send an email in Python: import smtplib fromaddr = '......................' toaddrs = '......................' msg = 'Spam email Test' username = '.......' password = '.......' server = smtplib.SMTP('smtp.gmail.com', 587)…
Jacob Kudria
  • 2,200
  • 3
  • 17
  • 18
33
votes
9 answers

trying to send mail using swift mailer, gmail smtp, php

Here is my code: setUsername('me@ff.com') ->setPassword('pass'); $mailer =…
champ
  • 807
  • 2
  • 11
  • 23
33
votes
3 answers

Using Javamail to connect to Gmail smtp server ignores specified port and tries to use 25

I'm trying to use javamail in a groovy script to send out an email via gmail. I've looked many places online and have been unable to get it working thus far. The error I'm getting when running my script is: DEBUG SMTP: useEhlo true, useAuth…
Bryan
  • 1,431
  • 1
  • 14
  • 19
33
votes
1 answer

Sending mail via SMTP using TLS

Does anybody know of any good libraries I can use to send a mail via SMTP from Haskell? I found SMTPClient and HaskellNet. The former does not support TLS and the latter does not seem to have examples for using TLS to send an email via SMTP. Did…
Salil
  • 9,534
  • 9
  • 42
  • 56
32
votes
5 answers

Ruby mailer is coming up with an EOFError

I am getting an EOFError (End Of File Error) on this code in my controller. The block where the error appears is at the end of the line that says UserMailer.deliver_message( I am unaware as to how to fix this, I have been stuck for about 2 months…
Deadder
  • 535
  • 1
  • 4
  • 16
32
votes
7 answers

Python 2: SMTPServerDisconnected: Connection unexpectedly closed

I have a small problem with sending an email in Python: #me == my email address #you == recipient's email address me = "some.email@gmail.com" you = "some_email2@gmail.com" # Create message container - the correct MIME type is…
Michael
  • 15,386
  • 36
  • 94
  • 143
32
votes
3 answers

In SMTP, must the RCPT TO: and TO: match?

When sending an email, the recipient list is given during the SMTP dialogue through RCTP TO: command. Later, in DATA command, header fields like 'To', 'Cc','bcc' are indicated. Does this RCPT TO list of recipients have to match with the headers…
Jelena
  • 476
  • 2
  • 5
  • 8
32
votes
7 answers

GitLab email setup: sending via another mail server

By default gitlab has the next configuration in gitlab.yml : email: from: notify@gitlabhq.com host: gitlabhq.com but, I need to specify other variables (host, port, user, password, etc) to use another mail server. How I do that?
el_quick
  • 4,656
  • 11
  • 45
  • 53