Solved

Send e-mail with cURL

Posted on 2011-09-15
6
2,065 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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Make check boxes work 8 41
-OutVariable to Global 1 18
javascript form - error when hitting enter 3 27
How do I Check for duplicate entries in mysql 15 23
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
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…

763 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