1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Plz help me perl guru(plz plz plz)

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

  1. rahul_mawana

    rahul_mawana New Member

    hello sir
    i m searching from 25 days a simple perl script to send mail in perl,..
    i tried many mail server as yahoo,gmail,rediff,and so many,but i couldn't got success,
    so any body can tell me any mail server by that i can send mail in perl,my perl script is right but i don't have any smtp server that can be used to send mail in perl,
    i want to send mail my self,but i don't know any smtp server,
    i m ready to make account on that mail server what i will use to send mail....
    plz plz plz plz plz sir help meee plz i m on windows xp sp2..
    here is my code***

    Code:
    use Net::SMTP;
    use MIME::Base64;
    $message="From: ".'senderdomain.com'."\nTo: ".'reciever@domain.com'."\n"."Subject: Hello\n\nTest\n\n";
    print $message;
    print "\n";
    my $DEBUG = 1;
    my $ServerName = 'my mail server';
    my $ServerAccount = encode_base64('XXXXX');
    my $ServerPwd = encode_base64('XXXXX');
    my $MailFrom = '$sender';
    my $MailTo = '$reciever';
    print "Server variables assigned\n";
    my $smtp = Net::SMTP->new($ServerName, Hello => "domain.com",  Debug => 1);
    die "Couldn't connect to server" unless $smtp;
    print "Server connection opened\n";
    if ( !$smtp->auth($ServerAccount, $ServerPwd) ) {
    print "authentication failed or not needed\n";
    }
    
    if ( !$smtp->mail( $MailFrom ) ) {
    print "sender not accepted\n";
    exit 1;
    }
    if (!$smtp->to( $MailTo ) ) {
    print "addressee not accepted\n";
    exit 1;
    }
    print "Server variables checked\n";
    my $maildata = $message;
    $smtp->data();
    $smtp->datasend( $maildata );
    $smtp->dataend();
    $smtp->quit();
    $smtp->quit;
    print "Finished sending email\n";
    
    **************************
    plz help sir plz sir plz
     
    Last edited by a moderator: Apr 6, 2009
  2. pradeep

    pradeep Team Leader

  3. rahul_mawana

    rahul_mawana New Member

    Preedeep sir i have maken a account on hotpop but when i connecting to smtp server of hotpop on port 25 then it is saying


    421 Cannot connect to SMTP server 38.113.3.70 (38.113.3.70:25), connect error 10
    061


    plz help me Preedeep sir
     
  4. rahul_mawana

    rahul_mawana New Member

    sory sir to mistake in spelling of your name
    Pradeep sir plz help me for my problem
     
  5. rahul_mawana

    rahul_mawana New Member

    Pradeep sir i try to connect on port 25000 and it has been connected but it is giving authntication error sir i m using encode_base64 scheme for encrypted user name and password.will i have to use another encoding scheme
    Waiting 4 your reply sir,
     
  6. rahul_mawana

    rahul_mawana New Member

    Pradeep sir i have understood my error basically port 25000 only for premium user not for free user.port 25 is for free user but it is not being connceted on port 25 ..
    plz help me sir
     
  7. pradeep

    pradeep Team Leader

  8. rahul_mawana

    rahul_mawana New Member

    sorry sir this is not solving my problem,
    why m i not connecting on hotpop smtp server on port 25
    help me sir ,is there not any other smtp server that can be used by me
     
  9. rahul_mawana

    rahul_mawana New Member

    sir i have searched a smtp server that can be used that is smtp.gawab.com and domain is www.gawab.com,
    but my programme is not working on this smtp server
    sir i m requesting you can plz tell me a small progamme that can send mail
    by this mail server,i know it will take more time to make an account on it,but
    you are the master and i hope you will help me,(or any other body help me)
    plz sir plz sir plz plz plz plz
    spend a small time for me ,i m in big trouble plz sir help me plz
    plz sir last and one time ,i m waiting your replay sir help me
     
  10. rahul_mawana

    rahul_mawana New Member

    koi to help kur doo yarr
     
  11. shabbir

    shabbir Administrator Staff Member

    Post in English :D
     

Share This Page