StillLearning has asked for the wisdom of the Perl Monks concerning the following question:

I've written a little code that should be sending an email to a cell phone or email account through a gmail account, the weird part is that it works fine sending it to email or any cell phone except for verizon. Verizon's txt code is 1234567890@vtext.com and this works when i type it manually into gmail. but when i put it in the code it refuses to send. Here's the code and thanks!
use Net::SMTP::TLS; my $mailto = '7578690817@vtext.com'; my $mailer = new Net::SMTP::TLS( 'smtp.gmail.com', Hello => 'smtp.gmail.com', Port => 587, User => 'fanny.piggs@gmail.com', Password=> 'PASSWORD'); $mailer->mail('fanny.piggs@gmail.com'); $mailer->to("$mailto"); $mailer->data; $mailer->datasend("Sent from perl!"); $mailer->dataend; $mailer->quit;

Replies are listed 'Best First'.
Re: SMTP Gmail
by spadacciniweb (Curate) on Mar 28, 2012 at 15:10 UTC
    Code is correct.
    But check the body, probably it isn't what you want.

    PS: 'Hello' => This parameter initiates the SMTP conversation. The host connecting to the remote SMTP server identifies itself by it's fully qualified DNS host name.


    (($_="Mzz ojjdloobnf jt uvy5502383")=~y~b-zg2-5c96-81~a-z0-9~s)=~s~~~s; print
      turns out verizon was spam blocking my messages, thanks!