Questions tagged [email]

Use this tag for questions involving code to send or receive email messages. Posting to ask why the emails you send are marked as spam is off-topic for Stack Overflow. Questions about configuration of mail servers belong on Server Fault.

Electronic mail, commonly called email or e-mail, is a method of exchanging digital messages from a sender to one or more recipients.

Modern email operates across the Internet or other computer networks. Some early email systems required that the sender and the recipient both be online at the same time - a system currently known as Instant messaging. Today's email systems are based on a store-and-forward model. Email servers accept, forward, deliver and store messages. Neither the users nor their computers are required to be online simultaneously; they need connect only briefly, typically to an email server, for as long as it takes to send or receive messages.

Email architecture is rich and varied; you should probably indicate whether your question concerns manipulation, email composition (, , , , etc.), message submission and transport (, ), or a particular mailbox storage and access protocol (, ) or perhaps a particular . There is a large number of additional tags you can use.

Programmers coming from modern protocols such as JSON and HTTP will be surprised to learn about the many layers of standards that they have to work with in order to be able to use 8-bit data, multimedia, Unicode, internationalization, tagged content, etc. The MIME standards in particular should be at least vaguely familiar.

References


Tag Usage

The tag can be used for any programming related problem in implementing features of emailing messages from one client to another. Ask about specific email server related problems at Server Fault, another Stack Exchange website.

Common problems which are not programming-related include

Related Tags

etc

59268 questions
392
votes
9 answers

mailto link with HTML body

I have a couple of mailto links in a HTML document. Can I insert HTML formatted body in the mailto: part of the href? Mail me Note that (2016) in iOS, it is…
GxG
  • 4,491
  • 2
  • 20
  • 18
374
votes
20 answers

How can I send an email using PHP?

I am using PHP on a website and I want to add emailing functionality. I have WampServer installed. How do I send an email using PHP?
user590849
  • 11,655
  • 27
  • 84
  • 125
362
votes
20 answers

How to send email attachments?

I am having problems understanding how to email an attachment using Python. I have successfully emailed simple messages with the smtplib. Could someone please explain how to send an attachment in an email. I know there are other posts online but as…
Richard
  • 15,152
  • 31
  • 85
  • 111
348
votes
12 answers

Send HTML emails with Python

How to send HTML content in email using Python? I can send simple texts.
ha22109
  • 8,036
  • 13
  • 44
  • 48
348
votes
6 answers

Change email address in Git

I have a project hosted in Git stash (now rebranded as Bitbucket Server). It is built using Jenkins. Now I made a typo while installing my Git locally. Like @ab.example instead of @abc.example After every build, Jenkins sends email notifications and…
mani_nz
  • 4,522
  • 3
  • 28
  • 37
330
votes
17 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…
mahoriR
  • 4,377
  • 3
  • 18
  • 27
326
votes
20 answers

How to send an email from JavaScript

I want my website to have the ability to send an email without refreshing the page. So I want to use Javascript.
Enter Friend's Email:
user906357
  • 4,575
  • 7
  • 28
  • 38
307
votes
25 answers

How do I send a file as an email attachment using Linux command line?

I've created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file. The next step I want to accomplish is to send that tar file…
Kit Roed
  • 5,167
  • 5
  • 30
  • 34
292
votes
11 answers

Sending emails in Node.js?

I recently started programming my first node.js. However, I discovered that I am unable to create a contact me form that sends straight to my email since I can't find any modules from node that is able to send emails. Does anyone know of a node.js…
NycCompSci
  • 3,137
  • 2
  • 15
  • 16
288
votes
18 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,881
  • 2
  • 14
  • 3
286
votes
15 answers

How to validate an email address in PHP

I have this function to validate an email addresses: function validateEMAIL($EMAIL) { $v = "/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/"; return (bool)preg_match($v, $EMAIL); } Is this okay for checking if the email address is valid or not?
Cameron
  • 27,963
  • 100
  • 281
  • 483
283
votes
25 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
  • 13,530
  • 29
  • 114
  • 159
279
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 Ross
  • 13,086
  • 11
  • 53
  • 88
278
votes
17 answers

Why do I get "'property cannot be assigned" when sending an SMTP email?

I can't understand why this code is not working. I get an error saying property can not be assigned MailMessage mail = new MailMessage(); SmtpClient client = new SmtpClient(); client.Port = 25; client.DeliveryMethod =…
Sam Stephenson
  • 5,200
  • 5
  • 27
  • 44
277
votes
9 answers

Testing HTML email rendering

Are there any good tools to easily test how HTML email will look across different email clients? I prefer something with instant feed back rather than a submit and wait service like http://litmusapp.com Or at the very least a way to test the Outlook…
ejunker
  • 10,816
  • 11
  • 41
  • 41