Solved

Send e-mail with cURL

Posted on 2011-09-15
6
2,151 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 50

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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 50

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
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.

751 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