Send e-mail with cURL

I'm pretty certain that sending an e-mail using cURL is easy; the command; the smtp data; the .txt file where the headers are locaetd; user name and password if required; recipient addresses, sender address. Or is it much more complicated than that. Basically, can you provide me wtih an example of sending mail from cURL.
Bobo--just_East_of_MadisonAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ray-solomonConnect With a Mentor Commented:
As of version 7.20.0 (February 9 2010), SMTP is one of the supported protocols in cURL.
http://curl.haxx.se/docs/manpage.html

CLI example: http://snipplr.com/view/55381/


However I prefer using PHPMailer if this is going to be for a php application.
0
 
Steve BinkCommented:
Why would you need to send it with cURL when PHP has a built-in mail() function?
0
 
Dave BaldwinFixer of ProblemsCommented:
cURL supports SMTP but this is the only example I could find http://snipplr.com/view/55381/  and it's cURL on the command line, not PHP curl.
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
Ray PaseurCommented:
No offense meant, but sending email with CURL is like using a chainsaw to nail jello to a wall.  Wrong topic and wrong tools.  There is a PHP mail() function that covers the entire waterfront.
http://php.net/manual/en/function.mail.php
0
 
Steve BinkCommented:
>>> sending email with CURL is like using a chainsaw to nail jello to a wall

No offense meant, but I am so stealing that.  The visuals are awesome.
0
 
Ray PaseurCommented:
PHPMailer is a good thing, for sure.  If your application has economic activity and you do not want to spend hours every month wrestling with the details of sending mail, formatting mail, defeating spam filters, tracking receipts and forwards, etc., you might consider one of the commercial services.  I use and recommend Constant Contact.  Their service is easy to use and almost embarrassingly inexpensive.
http://www.constantcontact.com/index.jsp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.