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
96
votes
3 answers

Giving email account a name when sending emails with Django through Google Apps

I am sending emails to users using Django through Google Apps. When the user receives emails sent from the Django app, they are from: do_not_reply@domain.example when looking at all emails in the inbox, people see the email's sender as: do_not_reply…
rfadams
  • 1,898
  • 2
  • 19
  • 21
94
votes
4 answers

Local SMTP server that can be used for testing and development - won't actually deliver mail

When I'm developing something that sends email, I sometimes don't want to actually send any email, but I do want to see what email would be sent using live data. However, there's not an easy way to do this, as I haven't found a local SMTP server…
SqlRyan
  • 33,116
  • 33
  • 114
  • 199
88
votes
21 answers

5.7.57 SMTP - Client was not authenticated to send anonymous mail during MAIL FROM error

I have to send mails using my web application. Given the below code showing The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail…
Reshma
  • 1,370
  • 7
  • 24
  • 38
88
votes
21 answers

Javamail Could not convert socket to TLS GMail

I'm trying to send an email using JavaMail through Gmail SMTP Server. This is the code: final String username = "mygmail@gmail.com"; final String password = "mygmailpassword"; Properties props = new Properties(); props.put("mail.smtp.auth",…
user962206
  • 15,637
  • 61
  • 177
  • 270
85
votes
7 answers

Failed to connect to mailserver at "localhost" port 25

I keep getting this error when I try to send an e-mail in PHP: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in…
Loolooii
  • 8,588
  • 14
  • 66
  • 90
84
votes
9 answers

Sending email with gmail smtp with codeigniter email library

load->library('email'); } function index() { $config['protocol'] = 'smtp'; $config['smtp_host'] =…
NanoBot
  • 837
  • 1
  • 7
  • 10
83
votes
4 answers

Receiving email in Node.js

I see a lot of Node.js modules out there that sends mail through SMTP. But is there a module to receive mail?
foobar
  • 10,854
  • 18
  • 58
  • 66
82
votes
13 answers

Unable to send email using Gmail SMTP server through PHPMailer, getting error: SMTP AUTH is required for message submission on port 587. How to fix?

I would like to send an email using Gmail SMTP server through PHP Mailer. this is my code IsSMTP(); $mail->CharSet="UTF-8"; $mail->SMTPSecure = 'tls'; $mail->Host =…
Mohammad Masoudian
  • 3,483
  • 7
  • 27
  • 45
80
votes
6 answers

How to figure out the SMTP server host?

I am using SMTP to send emails by PHP. My client has a shared hosting. I created an email account there. There is no information available about what will be the SMTP server for this account. I have tried: smtp.domainname.com But it's not able to…
Krishna Kant Sharma
  • 1,567
  • 1
  • 12
  • 18
79
votes
6 answers

How can I make SMTP authenticated in C#

I create new ASP.NET web application that use SMTP to send message. The problem is the smtp was not authenticated from who send the message. How can I make SMTP authenticated in my program? does C# have a class that have attribute for enter…
ecleel
  • 11,748
  • 15
  • 48
  • 48
77
votes
13 answers

PHPMailer - SMTP ERROR: Password command failed when send mail from my server

I have used phpmailer() concept to send mail to users from my shared server using php script, but I'm not able to send even though everything is right in my script according to phpmailer code. My code like this: $message = " This is testing…
Punniyam Moorthi
  • 893
  • 1
  • 11
  • 19
74
votes
3 answers

Storing Smtp from email friendly display name in Web.Config

I'm storing my mailsettings in the web config like so...
Naz
  • 1,793
  • 2
  • 13
  • 25
72
votes
9 answers

Unable to send SMTP mails using office365 settings

I am using SMTP mail for sending mail using Laravel. Everything working perfect other than office365 mail settings. Settings I have used is as below: SMTP HOST = smtp.office365.com SMTP PORT = 587 SMTP ENCRYPTION = tls SMTP USER =…
Milind Patel
  • 2,677
  • 4
  • 14
  • 31
71
votes
10 answers

php.ini & SMTP= - how do you pass username & password

My ISP account requires that I send a username & password for outbound SMTP mail. How do I get PHP to use this when executing php.mail()? The php.ini file only contains entries for the server (SMTP= ) and From: (sendmail_from= ).
Charles Faiga
  • 11,665
  • 25
  • 102
  • 139
71
votes
4 answers

How to send email using simple SMTP commands via Gmail?

For educational purposes, I need to send an email through an SMTP server, using SMTP's fundamental and simple rules. I was able to do that using smtp4dev. I telnet localhost 25 and and commands are: I want to do the same thing, using Gmail SMTP…
Saeed Neamati
  • 35,341
  • 41
  • 136
  • 188