Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

To reduce the packets captured to just those that are interesting you need a capture filter. http://wiki.wireshark.org/CaptureFilters has a good explanation; what you want is something like host smtp.gmail.com and port 25 (or 587, 465, etc.)

Since MIME::Lite->send isn't cutting it, why not use Net::SMTP::TLS directly? Something like:

sub make_and_send_email{ my ($from, $to,$subject,$message, $path) =@_; use Net::SMTP::TLS; my $un='myun'; my $pw='mypwd'; my $mh='smtp.gmail.com'; my $pt=25; # or 587, 465, etc depending on what gmail uses my $mailer = new Net::SMTP::TLS( $mh, Port => $pt, User => $un, Password => $pw, Timeout => 60, ) or die "Cannot create a TLS mailer instance!\n"; $mailer->mail($from); $mailer->to($to); $mailer->data(); my $msg = MIME::Lite->new( From => $from, 'Reply-to' => $from, To => $to, Subject => $subject, Type => 'multipart/related' ) or die "Cannot create a new email instance!\n"; $msg->attach( Type => 'TEXT', Data => $message, ) or die "Error adding TXT: $!\n"; $msg->attach( Type => 'aplication/pdf', Path => $path, Disposition => 'attachment' ) or die "Error adding PDF: $!\n"; $mailer->datasend($msg->as_string); $mailer->dataend(); $mailer->quit(); }

In reply to Re^9: MIME::Lite error => SMTP auth() command not supported on smtp.gmail.com by keszler
in thread MIME::Lite error => SMTP auth() command not supported on smtp.gmail.com by ted.byers

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (11)
As of 2024-04-18 14:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found