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

Send Email via C# through Google Apps account

I have a standard Google Apps account. I have setup a custom domain through Google Apps. I am able to send and receive emails successfully through Google Apps when I use the Gmail interface. However, I want to send an email via code. In order to…
user70192
  • 13,786
  • 51
  • 160
  • 240
67
votes
17 answers

The server response was: 5.7.0 Must issue a STARTTLS command first. i16sm1806350pag.18 - gsmtp

I am trying to send mail using gmail, and I am getting an exception that is The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. i16sm1806350pag.18 -…
Ankur Gupta
  • 933
  • 3
  • 15
  • 27
66
votes
7 answers

How to read system.net/mailSettings/smtp from Web.config

This is my web.config mail settings:
nermik
  • 1,485
  • 4
  • 16
  • 24
60
votes
17 answers

Testing SMTP with .net

I need to configure a SMTP server for testing my website which sends emails (for registration confirmation etc). I dont actually want the email to be sent, I just want to make sure that my code is correct. So I want to be able to check that the…
iasksillyquestions
  • 5,558
  • 12
  • 53
  • 75
58
votes
9 answers

How to send email to multiple address using System.Net.Mail

I have smtp email functionality. it works for single address but has problem in multiple address. i am passing multiple addresses using following line of code. MailAddress to = new MailAddress("abc@gmail.com,xyz@gmail.com"); Please let me know the…
Denish
  • 983
  • 1
  • 13
  • 20
58
votes
3 answers

Best practices: Sending email on behalf of users

The company I work for provides testing services for the healthcare industry. As part of our services, we need to send email to our clients' employees. Typically, these are temp, part-time, or contract employees, and so have private email…
Ben Doom
  • 7,865
  • 1
  • 27
  • 30
56
votes
1 answer

SMTP STARTTLS certificate negotitiation via telnet

I am trying to start tls in sendmail, but I do not know how to use certificate. Please suggest me way > telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 ESMTP Sendmail ;…
Gaurav Minocha
  • 706
  • 1
  • 5
  • 10
54
votes
6 answers

SMTP AUTH extension not supported by server

Using python I want to send email from my app but it shows the error SMTP AUTH extension not supported by server Code for the program, import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText fromaddr =…
KKD
  • 708
  • 1
  • 6
  • 15
53
votes
6 answers

How to send utf-8 e-mail?

how to send utf8 e-mail please? import sys import smtplib import email import re from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText def sendmail(firm, fromEmail, to, template, subject, date): with…
Martin Drlík
  • 1,434
  • 1
  • 14
  • 27
52
votes
5 answers

How can I save an email instead of sending when using SmtpClient?

I am using SmtpClient to send an email with an attachment. However for a certain batch we need to somehow save the MailMessage instead of sending them. We are then thinking/hoping to manually upload the messages to the users drafts folder. Is it…
user17510
  • 1,549
  • 5
  • 20
  • 37
52
votes
7 answers

Using JavaMail with TLS

I found several other questions on SO regarding the JavaMail API and sending mail through an SMTP server, but none of them discussed using TLS security. I'm trying to use JavaMail to send status updates to myself through my work SMTP mail server,…
dancavallaro
  • 13,109
  • 8
  • 37
  • 33
51
votes
5 answers

Rails 4, how to correctly configure smtp settings (gmail)

I am trying to create a contact form in Rails 4. I did some digging around here and was able to get most of the stuff to work. (followed @sethfri's work here Contact Form Mailer in Rails 4) Right now I am able to fill out my form box and hit send.…
ResrieC
  • 583
  • 1
  • 5
  • 6
51
votes
17 answers

phpmailer - The following SMTP Error: Data not accepted

I'm trying to figure out this issue for 6 hours. But there is nothing to make sense. Here is the scenario; There is a well formatted HTML template. $mail_body = ' Message Num : 769
Message Date : 2013-04-08 09:03:21
Yasin Yörük
  • 1,500
  • 7
  • 27
  • 51
51
votes
10 answers

Connecting to smtp.gmail.com via command line

I am in the process of writing an application that sends mail via an valid GMail user ID and password. I just wanted to simulate the SMTP connection on my Windows XP command line, and when I telnet smtp.gmail.com at 465 port - I don't see any thing.…
Abhishek
  • 6,862
  • 22
  • 62
  • 79
48
votes
10 answers

A simple local SMTP server

I want to test a Java code for sending email. I don't want to use any commercial mail client or connect to any external mail providers (like Gmail or Yahoo). I would like to know if there is any software which allows a user to configure dummy email…
sathish kumar
  • 1,187
  • 5
  • 17
  • 21