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
216
votes
0 answers

Effective method to hide email from spam bots

On my homepage, I'm using this method to hide my email from spam bots: Contact me What do you think about it? Is it effective?…
abatishchev
  • 98,240
  • 88
  • 296
  • 433
215
votes
9 answers

How to send email from Terminal?

I know there are ways to send email from terminal in Linux/MacOS, but I can't seem to find proper documentation on how to do that. Basically I need it for my bash script that notifies me every time there is a change in a file.
NoobDev4iPhone
  • 5,531
  • 10
  • 33
  • 33
201
votes
4 answers

Check that an email address is valid on iOS

Possible Duplicate: Best practices for validating email address in Objective-C on iOS 2.0? I am developing an iPhone application where I need the user to give his email address at login. What is the best way to check if an email address is a…
raaz
  • 12,410
  • 22
  • 64
  • 81
188
votes
8 answers

Regex empty string or email

I found a lot of Regex email validation in SO but I did not find any that will accept an empty string. Is this possible through Regex only? Accepting either empty string or email only? I want to have this on Regex only.
rob waminal
  • 18,117
  • 17
  • 50
  • 64
186
votes
10 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
  • 55,620
  • 80
  • 262
  • 364
185
votes
10 answers

Android: Share plain text using intent (to all messaging apps)

I'm trying to share some text using an intent: Intent i = new Intent(android.content.Intent.ACTION_SEND); i.setType("text/plain"); i.putExtra(android.content.Intent.EXTRA_TEXT, "TEXT"); and warping with…
skgskg
  • 1,873
  • 2
  • 12
  • 7
181
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.example Return-PATH: bouncemgmt@ourcompany.example The problem that we are facing is that some email servers will…
Geo
  • 8,663
  • 13
  • 63
  • 93
178
votes
10 answers

Validating email addresses using jQuery and regex

I'm not too sure how to do this. I need to validate email addresses using regex with something like…
RussP
  • 1,973
  • 3
  • 16
  • 13
170
votes
7 answers

send mail from linux terminal in one line

I know there is the command mail in linux to send emails via command line. How can I send an simple email with one line from the terminal though? For example: mail user@gmail.com [subject] [body] And have the email sent without any confirmation or…
cHam
  • 2,624
  • 7
  • 26
  • 28
169
votes
14 answers

embedding image in html email

I'm trying to send a multipart/related html email with embedded gif images. This email is generated using Oracle PL/SQL. My attempts have failed, with the image showing up as a red X (in Outlook 2007 and yahoo mail) I've been sending html emails…
tbone
  • 15,107
  • 3
  • 33
  • 40
165
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
  • 13,282
  • 10
  • 43
  • 60
161
votes
9 answers

Sending email with PHP from an SMTP server

$from = "someonelse@example.com"; $headers = "From:" . $from; echo mail ("borutflis1@gmail.com" ,"testmailfunction" , "Oj",$headers); I have trouble sending email in PHP. I get an error: SMTP server response: 530 SMTP authentication is required. I…
Borut Flis
  • 15,715
  • 30
  • 92
  • 119
159
votes
23 answers

Java regex email

First of all, I know that using regex for email is not recommended but I gotta test this out. I have this regex: \b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b In Java, I did this: Pattern p =…
Tu Hoang
  • 4,622
  • 13
  • 35
  • 48
157
votes
29 answers

Best way to obfuscate an e-mail address on a website?

I've spent the past few days working on updating my personal website. The URL of my personal website is (my first name).(my last name).com, as my last name is rather unusual, and I was lucky enough to pick up the domain name. My e-mail address is…
Adam Rezich
  • 3,122
  • 6
  • 31
  • 39
156
votes
18 answers

Trying to get Laravel 5 email to work

I'm trying to send an email to a specified user by typing in the URL, but I'm getting the following error: Swift_TransportException in AbstractSmtpTransport.php line 383: Expected response code 250 but got code "530", with message "530 5.7.1 …
Vantheman6
  • 1,719
  • 3
  • 13
  • 13