7 comment

  1. Hi , I have a problem when I send a long string used Data=>$content, $content included \r\n , It can not sent all the content of $content . could you please tell me what the problem is ?

  2. Hi,
    I’ve got this error message:
    SMTP Failed to connect to mail server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
    at C:/EclipseWorkspaces/csse120/Perl_testy/Tk_hello_world.pl line 29

    Here is code:

    use MIME::Lite;
    $user = 'aocmct@gmail.com';
    $pass = 'xxxxxxxxxx';
    print "$user\n";
    print "$pass\n";
    MIME::Lite->send('smtp', 'smtp.gmail.com', 
    	AuthUser=>$user, AuthPass=>$pass, Timeout=>10);
    # AuthUser=>$user, AuthPass=>$pass);
    my $MailFrom = 'aocmct@gmail.com';
    my $to_list  = 'jan.vicher@yahoo.com';
    my $cc_list  = 'ice809@seznam.cz';
    my $subject  = "hello test";
    my $message  = "This email was generated automatically.";
    my $msg = MIME::Lite->new(
        From     => $MailFrom,
        To       => $to_list,
        Cc       => $cc_list,
        Subject  => $subject,
        Type     => 'TEXT',
        Encoding => '7bit',
        Data     => $message,
    print "I\'m sending message\.\.\.\n";
    print $msg;

    Could you help me please?


    Still, have a question? Get help on our forum!