Perl Mail::sender Module Send mail

Source: Internet
Author: User

1 #!/usr/bin/perl-w2  UseStrict;3  UseMail::Sender;4  5 my $count=1;6  while(1){7 my $sender= mail::sender->New ({8SMTP ='smtp.163.com',9         #Here's an example of 163 .Tenfrom = ='Write your 163 e-mail address here: [Email protected]', OneAuth ='LOGIN', AAuthid ='here, write your 163. Email User name: Username', -Authpwd ='Write your e-mail password here: password'} -) or die "Cannot send mail:$!\n"; the   - my $messages='Hello here is the content to send'; -   -     $sender-MAILMSG ({ +to = ='which mailbox to send to: [email protected]', -Subject ='Mailbox Header', +msg =$messages} A     ); at $sender-Close(); - Print "section $count sent complete!\n"; - $count++; -}

Here's a while (1) test has been sent
Perl does not install the Mail::sender module by default and installs itself

Perl Mail::sender Module Send mail

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.