Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    EasyMail 2.4.3

    Download button

    No screenshots available
    Downloads: 353  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    QIAN YU | More programs
    Perl Artistic License / FREE
    July 18th, 2007, 08:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    EasyMail description

    EasyMail is a Perl Send Mail Interface.

    EasyMail is a Perl Send Mail Interface.

    SYNOPSIS

    use EasyMail;

    if(defined(&EasyMail::foo)){
    print "lib is included";
    }else{
    print "lib is not included";
    }

    my $email_from = {'email'=>'test@adways.net', 'name'=>'Test'};

    my $email_to = 'receiver@adways.net';
    # $email_name_pair is a variable specify a email and name # $name can be undef,set $name=undef if $name eq '' # $email_name_pair can be a string # A: "$email" # B: "$name $email" if not A # C: "$email $name" if not A,B # D: ""$name"" if not A,B,C # E: "$name" if not A,B,C,D # $email can be a array_ref # A: [$email,$name] # B: [$name,$email] if not A # $email can be a hash_ref # {email=>$email,name=>$name}
    my $email_cc = $email_to;
    my $email_bcc = [];

    my $ra_filters = ['adways.net'];

    my $file = {
    'file_path' => '/usr/local/src/test.txt',
    #path to file
    'file_bin' => undef,
    #binary content of file
    'file_name' => undef,
    #file name
    'content_type' => undef,
    #content type
    'content_id' => undef
    #content_id, when u wanna embed picture in html email u need it
    # the rule of $file # 1,you "must and can only" set one of file_path and file_bin,or will throw an exception # 2,if file_name set, {file_name}=file_name # 3,if file_name not set and file_path set,then {file_name} will be generate by file_path # 4,if file_name not set and file_path not set and content_id set,then no {file_name} # 5,if content_type setŒthen {content_type}=content_type # 6,if content_type not set and {file_name} setŒthen {content_type} will be generate by {file_name} # 7,if content_id set,then consider this file as part of multi_related structureŒelse if content_id not set then consider this file as part of multi_mixed structure };
    my $mail = {
    'sender_type' => 'SMTPAUTHLOGIN',
    # SENDMAIL | SMTPAUTHLOGIN | SMTPAUTHPLAIN | SMTPAUTHNONE
    # default is 'SENDMAIL'
    'smtp_host' => '127.0.0.1',
    # smtp host address default is 127.0.0.1 (if sender is smtp)
    'smtp_port' => 25,
    # smtp host port (if sender is smtp)
    'smtp_usr' => 'admin',
    # smtp author usr name (if needed)
    'smtp_pass' => 'password',
    # smtp author usr pass (if needed)
    'sendmail_path' => '/usr/sbin',
    # the path of sendmail, default is 'sendmail'(if needed)
    'type' => 'txt',
    # can be 'html' 'plain' 'txt' 'text' default is 'plain'
    # 'txt' 'text' is alias for 'plain'
    # the recomend way you set mail as plain text mail is set it 'plain'
    'subject' => 'Test Mail',
    # the mail subject, default is 'No Subject'
    'body' => 'This is a test.',
    # the text content of mail, default is ''
    'files' => $file,
    # files to be attach to the mail files=>[$file,$file,..], default is []
    'from' => $email_from,
    # $email_name_pair
    'to' => $email_to,
    # $email_name_pair || [$email_name_pair,$email_name_pair,..], default is []
    'cc' => $email_cc,
    # $email_name_pair || [$email_name_pair,$email_name_pair,..], default is []
    'bcc' => $email_bcc,
    # $email_name_pair || [$email_name_pair,$email_name_pair,..], default is []
    'mail_filter' => $ra_filters,
    # [$email_filter, $email_filter, ..], default is []
    # email_filter: only allow specified email to send ( for debug use)
    'return_path' => '/tmp/failmail',
    #sendmail to this address if sendmail fail ,default is not set
    'src_encoding' => 'utf8',
    #source mail encoding
    'dst' => 'un'
    # 'cn' || 'un' || 'jp'
    # 'cn' for gb2312 encoding, 'un' for utf8 encoding, 'jp' for iso-2022-jp encoding
    # extra rules: # from is must set # to and cc must contains more than one valid email # if (input is all unicode or input is all ascii){ # src_encoding can be not set # }else{ # src_encoding must set # } # dst must set # in to cc bcc, [$email,$email] is parse as two receiver email
    };

    EasyMail::sendmail($mail);

    The synopsis above only lists the major methods and parameters.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    send mail interface | Perl interface | Perl class | EasyMail | Perl | send

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM