use Net::SMTP; my $ServerName = "smtp.google.com" ; my $smtp = Net::SMTP->new($ServerName, port=> 587, Debug => 1) ; die "Couldn't connect to server" unless $smtp ; my $MailFrom = "sender\@gmail.com" ; my $MailTo = "receiver\@received.com" ; $smtp->mail( $MailFrom ) ; $smtp->to( $MailTo ) ; $smtp->data() ; $smtp->datasend("Hello World!\n\n") ; $smtp->dataend() ; $smtp->quit() ;
The debugs I received include 550 5.7.1 ... Relaying denied and 503 need recipient
Thanks
In reply to sending emails with gmail by chicago928
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |