Is it possible to login to my gmail account and send mail using curl in php? I don’t want to use pop3 or any other function.
$msg = "something";
$email = "sa@sas.com";
$pass= "something"
function send($msg, $email, $pass)
{
//something
}
I have never used curl, to be honest. Have just heard of it.
It is theoretically possible, but extremely complex and subject to breaking whenever Google decide to change their HTML interface. Not a good idea.
Your best option is to use Google Mails’s SMTP servers. Mailer packages like SwiftMailer make this easy to set up.
Here is an example for how to connect to GMail with SMTP.