News for hackers. Stuff that matters.
Re:So You'd Like to Send Some Email (Through Code) by javery on Wednesday April 21, 2010 @09:51AM (#1282158)
Or just use one of the many services that solves these problems for you, like http://authsmtp.com, http://sendgrid.com, http://postmarkapp.com.
Re:So You'd Like to Send Some Email (Through Code) by sorbits on Wednesday April 21, 2010 @03:13PM (#1283057)
Some of us like to be in control of our data and/or not pay others for what is essentially free.

Also, I am not sure how third party email sending services can avoid having me setup a SPF record — as for the PTR record, it’s a good thing to have even if you do not plan to use the IP for sending emails.

Re:So You'd Like to Send Some Email (Through Code) by netcan on Wednesday April 21, 2010 @04:06PM (#1283152)
Email that's hard is free. Email made easy costs something.
Re:So You'd Like to Send Some Email (Through Code) by mikemccabe on Wednesday April 21, 2010 @02:45PM (#1282996)
If you use squirrelmail, you can send messages with wget. This avoids many anti-spam and configuration issues.

wget --save-cookies cookies.txt --keep-session-cookies --post-data 'login_username=username&secretkey=password' http://webmail.server.com/src/redirect.php

wget --load-cookies cookies.txt --post-data 'body=body here&send_to=recipient%40wherever.com&subject=subject here&send=1' http://webmail.server.com/src/compose.php

For a bit more, see:

http://mikemccabe.wordpress.com/2007/08/07/sending-email-wit...

Re:So You'd Like to Send Some Email (Through Code) by lazyant on Wednesday April 21, 2010 @09:49AM (#1282153)
This is all fine but what he's talking about is server and DNS configuration, not "There's a bug in this code, though. Do you see it?"
Re:So You'd Like to Send Some Email (Through Code) by luigi on Wednesday April 21, 2010 @12:31PM (#1282613)
If I wrote that code, I'd be pissed off.
Re:So You'd Like to Send Some Email (Through Code) by rquirk on Wednesday April 21, 2010 @02:34PM (#1282963)
Here's the original on SO http://stackoverflow.com/questions/1200882/ - the author looks pretty angry in his photo! :-)
Re:So You'd Like to Send Some Email (Through Code) by IgorPartola on Wednesday April 21, 2010 @08:19AM (#1281963)
Also, by default in PHP e-mail subjects and other headers containing non-ASCII chars will not be properly encoded. Here's my way of getting things to work: http://igorpartola.com/web-development/proper-way-to-send-e-...
Re:So You'd Like to Send Some Email (Through Code) by wbond on Wednesday April 21, 2010 @09:09AM (#1282066)
If you are sending mail with PHP and have UTF-8 content in the subject, recipient name or body, the fEmail class (http://flourishlib.com/fEmail) can handle it all. It supports most common email usage patterns, including HTML content, attachments, S/MIME and sending via SMTP with or without authentication.

It doesn't require any non-standard PHP extensions unless you want to use S/MIME, in which case it requires openssl.

Re:So You'd Like to Send Some Email (Through Code) by aymeric on Wednesday April 21, 2010 @06:13PM (#1283362)
I read some people use the Google SMTP server to send their emails (when they use Google Apps for your domain).

What would be the benefits for me to use MailChimp / AuthSmtp / SendGrid / PostMark? Where do I get the best chances to have my emails reach destination?

Thanks

Re:So You'd Like to Send Some Email (Through Code) by dedward on Wednesday April 21, 2010 @09:47AM (#1282150)
What you are describing isn't a code problem, but an infrastructure one - a useful network has an MTA for just such outgoing mails, with all the anti-spam bases covered. All the various applications and servers that need to send mail will smarthost to that.
Re:So You'd Like to Send Some Email (Through Code) by goodmitton on Wednesday April 21, 2010 @02:23PM (#1282926)
Sending emails has always been a problem for me. The email either gets placed in their spam box (people with aol and yahoo) or the email never arrive there at all (people with comcast and sbc emails). Does anyone have more additional information on how to fix this?
Re:So You'd Like to Send Some Email (Through Code) by heyjonboy on Wednesday April 21, 2010 @02:51PM (#1283008)
Comcast requires that the sending address be a real mailbox on the server pointed to by your domain's MX records -- a catch-all address doesn't cut it. When in doubt, check the logs from your mail server.
Re:So You'd Like to Send Some Email (Through Code) by timmorgan on Wednesday April 21, 2010 @02:25PM (#1282936)
The first I've heard of SPF being antiquated. I always configure a SPF record first just because it's so darned easy.