Can any perl expert help mee plz

Discussion in 'Perl' started by rahul_mawana, Apr 13, 2009.

  1. rahul_mawana

    rahul_mawana New Member

    Joined:
    Apr 4, 2009
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    0
    hello friends i m trying to send emil in perl
    using smtp.gawab.com,every thing is ok not error is displayed
    but email is not going successfully on reciever account ,
    plz can any perl expert help mee i m in big problem plz
    mail is going from my computer ,my antivirus detecting it..i m free user on www.gawab.com
    i m on windows xp
    this is my code
    **************
    Code:
    use Net::SMTP; 
    print "Content-type:text/html\n\n"; 
    my $debug = 1; 
    if($debug) 
    { 
    $| = 1; 
    open(STDERR,">>mail.txt"); 
    } 
    #-smtp server name 
    my $server = "smtp.gawab.com"; 
    #-a new object of the server 
    $smtp = Net::SMTP -> new($server,Debug=>1); 
    die "Could not connect to the server" unless $smtp; 
    #-authorizing entry 
    $smtp->auth([EMAIL="'sender@gawab.com','password'"]'sender@gawab.com','password'[/EMAIL]); 
    #-from and to 
    $smtp->mail("[EMAIL="me@gawab.com"]me@gawab.com[/EMAIL]"); #this is the real "from" address 
    $smtp->to("[EMAIL="you@gmail.com"]you@gmail.com[/EMAIL]"); #this is the real "to" address 
    #-message send 
    $smtp->data(); 
    $smtp->datasend("To: [EMAIL="you@gmail.com\n"]you@gmail.com\n[/EMAIL]"); #this is the "to" address displayed in the mail 
    $smtp->datasend("From: [EMAIL="me@gawab.com\n"]me@gawab.com\n[/EMAIL]"); #this is the "from" address displayed in the mail 
    $smtp->datasend("Subject: Mail Test\n"); 
    $smtp->datasend("\n"); 
    $smtp->datasend("This is mail test number : NET-SMTP-E-PL-ROCHESU-005\n"); 
    $smtp->datasend("\n"); 
    ($smtp->dataend();
    #-quit connection to server 
    $smtp->quit(); 
    @@@@@@@
    plz sir help me plz
     
    Last edited by a moderator: Apr 13, 2009
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Couple of things.

    1. Use Code blocks for Code in posts.
    2. Title should be something better than what you have posted and remember that next time.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice