Share this on (or read 7 comments/add one below):

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/ line 29

    Here is code:

    use MIME::Lite;
    $user = '';
    $pass = 'xxxxxxxxxx';
    print "$user\n";
    print "$pass\n";
    MIME::Lite->send('smtp', '', 
    	AuthUser=>$user, AuthPass=>$pass, Timeout=>10);
    # AuthUser=>$user, AuthPass=>$pass);
    my $MailFrom = '';
    my $to_list  = '';
    my $cc_list  = '';
    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?


    Have a question? Post it on our forum!