Solved

Send e-mail with cURL

Posted on 2011-09-15
6
2,326 Views
Last Modified: 2012-05-12
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.
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 51

Expert Comment

by:Steve Bink
ID: 36546937
Why would you need to send it with cURL when PHP has a built-in mail() function?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 36546976
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
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 36547034
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
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 
LVL 51

Expert Comment

by:Steve Bink
ID: 36547186
>>> 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
 
LVL 10

Accepted Solution

by:
ray-solomon earned 500 total points
ID: 36548165
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
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 36548639
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

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question