Solved

Send e-mail with cURL

Posted on 2011-09-15
6
1,514 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
6 Comments
 
LVL 50

Expert Comment

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

Expert Comment

by:Dave Baldwin
Comment Utility
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 108

Expert Comment

by:Ray Paseur
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 50

Expert Comment

by:Steve Bink
Comment Utility
>>> 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
Comment Utility
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 108

Expert Comment

by:Ray Paseur
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now