Skip to main content
The 2024 Developer Survey results are live! See the results

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.

email
568 votes
30 answers
543k views

PHP mail function doesn't complete sending of e-mail

<?php $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $from = 'From: yoursite.com'; $to = '[email protected]'; $subject = 'Customer ...
user3818620's user avatar
  • 5,723
701 votes
25 answers
477k views

Sending Email in Android using JavaMail API without using the default/built-in app

I am trying to create a mail sending application in Android. If I use: Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); This will launch the built-in Android application; I'm ...
Vinayak Bevinakatti's user avatar
965 votes
26 answers
668k views

Sending email in .NET through Gmail

Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show. Is it possible ...
Mike Wills's user avatar
  • 21.2k
465 votes
24 answers
120k views

How do you make sure email you send programmatically is not automatically marked as spam?

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology. Of ...
Leon Bambrick's user avatar
409 votes
16 answers
893k views

Send email using the GMail SMTP server from a PHP page

I am trying to send an email via GMail's SMTP server from a PHP page, but I get this error: authentication failure [SMTP: SMTP server does no support authentication (code: 250, response: mx.google....
skb's user avatar
  • 30.8k
378 votes
20 answers
1.2m views

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's user avatar
  • 11.7k
331 votes
20 answers
1.2m views

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. <form action="javascript:sendMail();" name="pmForm" id="pmForm" method="post"> ...
user906357's user avatar
  • 4,645
263 votes
31 answers
552k views

Sending email through Gmail SMTP server with C#

For some reason neither the accepted answer nor any others work for me for "Sending email in .NET through Gmail". Why would they not work? UPDATE: I have tried all the answers (accepted and otherwise)...
CVertex's user avatar
  • 18.2k
864 votes
18 answers
1.3m views

What characters are allowed in an email address?

I'm not asking about full email validation. I just want to know what are allowed characters in user-name and server parts of email address. This may be oversimplified, maybe email adresses can take ...
WildWezyr's user avatar
  • 10.6k
410 votes
9 answers
629k views

mailto link with HTML body

I have a couple of mailto links in a HTML document. <a href="mailto:etc..."> Can I insert HTML formatted body in the mailto: part of the href? <a href="mailto:[email protected]?subject=Me&body=...
GxG's user avatar
  • 4,671
296 votes
14 answers
402k views

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 ...
Cameron's user avatar
  • 28.6k
369 votes
21 answers
612k views

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 ...
Richard's user avatar
  • 15.7k
420 votes
13 answers
277k views

How to get the Android device's primary e-mail address

How do you get the Android's primary e-mail address (or a list of e-mail addresses)? It's my understanding that on OS 2.0+ there's support for multiple e-mail addresses, but below 2.0 you can only ...
Brandon O'Rourke's user avatar
148 votes
16 answers
268k views

How to check if an email address exists without sending an email?

I have come across this PHP code to check email address using SMTP without sending an email. Has anyone tried anything similar or does it work for you? Can you tell if an email customer / user enters ...
php-guy's user avatar
  • 1,483
312 votes
25 answers
774k views

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 ...
Kit Roed's user avatar
  • 5,217

15 30 50 per page
1
2 3 4 5
372