ヤミRoot VoidGate
User / IP
:
216.73.216.33
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
perl5
/
man
/
man3
/
Viewing: Mail::DWIM.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DWIM 3" .TH DWIM 3 "2014-10-25" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Mail::DWIM \- Do\-What\-I\-Mean Mailer .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Mail::DWIM qw(mail); \& \& mail( \& to => \*(Aqfoo@bar.com\*(Aq, \& subject => \*(Aqtest message\*(Aq, \& text => \*(Aqtest message text\*(Aq \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Mail::DWIM\*(C'\fR makes it easy to send email. You just name the recipient, the subject line and the mail text and Mail::DWIM does the rest. .PP This module isn't for processing massive amounts of email. It is for sending casual emails without worrying about technical details. .PP \&\f(CW\*(C`Mail::DWIM\*(C'\fR lets you store commonly used settings (like the default sender email address or the transport mechanism) in a local configuration file, so that you don't have to repeat settings in your program code every time you want to send out an email. You are certainly free to override the default settings if required. .PP \&\f(CW\*(C`Mail::DWIM\*(C'\fR uses defaults wherever possible. So if you say .PP .Vb 1 \& use Mail::DWIM qw(mail); \& \& mail( \& to => \*(Aqfoo@bar.com\*(Aq, \& subject => \*(Aqtest message\*(Aq, \& text => \*(Aqtest message text\*(Aq, \& ); .Ve .PP that's enough for the mailer to send out an email to the specified address. There's no \f(CW\*(C`from\*(C'\fR field, so \f(CW\*(C`Mail::DWIM\*(C'\fR uses 'user@domain.com' where \f(CW\*(C`user\*(C'\fR is the current Unix user and \f(CW\*(C`domain.com\*(C'\fR is the domain set in the Perl configuration (\f(CW\*(C`Config.pm\*(C'\fR). If you want to specify a different 'From:' field, go ahead: .PP .Vb 6 \& mail( \& from => \*(Aqme@mydomain.com\*(Aq, \& to => \*(Aqfoo@bar.com\*(Aq, \& subject => \*(Aqtest message\*(Aq, \& text => \*(Aqtest message text\*(Aq, \& ); .Ve .PP By default, \f(CW\*(C`Mail::DWIM\*(C'\fR connects to a running sendmail daemon to deliver the mail. But you can also specify an \s-1SMTP\s0 server: .PP .Vb 8 \& mail( \& to => \*(Aqfoo@bar.com\*(Aq, \& subject => \*(Aqtest message\*(Aq, \& text => \*(Aqtest message text\*(Aq, \& transport => \*(Aqsmtp\*(Aq, \& smtp_server => \*(Aqsmtp.foobar.com\*(Aq, \& smtp_port => 25, # defaults to 25 \& ); .Ve .PP If your \s-1SMTP\s0 server has \s-1SASL\s0 support, you can also specify a user name and a password: .PP .Vb 2 \& user => \*(Aqjoeschmoe\*(Aq, \& password => \*(Aqtop5ecret\*(Aq, .Ve .PP Or, if you prefer that Mail::DWIM uses the \f(CW\*(C`mail\*(C'\fR Unix command line utility, use 'mail' as a transport: .PP .Vb 7 \& mail( \& to => \*(Aqfoo@bar.com\*(Aq, \& subject => \*(Aqtest message\*(Aq, \& text => \*(Aqtest message text\*(Aq, \& transport => \*(Aqmail\*(Aq, \& program => \*(Aq/usr/bin/mail\*(Aq, \& ); .Ve .PP On a given system, these settings need to be specified only once and put into a configuration file. All \f(CW\*(C`Mail::DWIM\*(C'\fR instances running on this system will pick them up as default settings. .SS "Configuration files" .IX Subsection "Configuration files" There is a global \f(CW\*(C`Mail::DWIM\*(C'\fR configuration file in \f(CW\*(C`/etc/maildwim\*(C'\fR with global settings and a user-specific file in \f(CW\*(C`~user/.maildwim\*(C'\fR which overrides global settings. Both files are optional, and their format is \s-1YAML:\s0 .PP .Vb 4 \& # ~user/.maildwim \& from: me@mydomain.com \& reply\-to: me@mydomain.com \& transport: sendmail .Ve .SS "Error Handling" .IX Subsection "Error Handling" By default, \f(CW\*(C`Mail::DWIM\*(C'\fR throws an error if something goes wrong (aka: it dies). If that's not desirable and you want it to return a true/false value code instead, set the \f(CW\*(C`raise_error\*(C'\fR option to a false value: .PP .Vb 5 \& my $rc = mail( \& raise_error => 0, \& to => \*(Aqfoo@bar.com\*(Aq, \& ... \& ); \& \& if(! $rc) { \& die "Release the hounds: ", Mail::DWIM::error(); \& } .Ve .PP The detailed error message is available by calling \fIMail::DWIM::error()\fR. .SS "Attaching files" .IX Subsection "Attaching files" If you want to include an image, a \s-1PDF\s0 files or some other attachment in an email, use the \f(CW\*(C`attach\*(C'\fR parameter .PP .Vb 6 \& mail( \& to => \*(Aqfoo@bar.com\*(Aq, \& subject => \*(AqPics of my new dog\*(Aq, \& attach => [\*(Aqdoggie1.jpg\*(Aq, \*(Aqdoggie2.jpg\*(Aq], \& text => "Hey, here\*(Aqs two cute pictures of Fritz :)", \& ); .Ve .SS "Sending \s-1HTML\s0 Emails" .IX Subsection "Sending HTML Emails" Many people hate \s-1HTML\s0 emails, but if you also attach a plaintext version for people with arcane email readers, everybody is happy. \f(CW\*(C`Mail::DWIM\*(C'\fR makes this easy with the \f(CW\*(C`html_compat\*(C'\fR option: .PP .Vb 6 \& mail( \& to => \*(Aqfoo@bar.com\*(Aq, \& subject => \*(Aqtest message\*(Aq, \& html_compat => 1, \& text => \*(AqThis is an <b>HTML</b> email.\*(Aq \& ); .Ve .PP This will create two attachments, the first one as plain text (generated by HTML::Text to the best of its abilities), followed by the specified \s-1HTML\s0 message marked as content-type \f(CW\*(C`text/html\*(C'\fR. Non-HTML mail readers will pick up the first one, and Outlook-using marketroids get fancy \s-1HTML.\s0 Everyone wins. .SS "Test Mode" .IX Subsection "Test Mode" If the environment variable \f(CW\*(C`MAIL_DWIM_TEST\*(C'\fR is set to a filename, \&\f(CW\*(C`Mail::DWIM\*(C'\fR prepares mail as usual, but doesn't send it off using the specified transport mechanism. Instead, it appends outgoing mail ot the specified file. .PP \&\f(CW\*(C`Mail::DWIM\*(C'\fR's test suite uses this mode to run a regression test without needing an \s-1MTA.\s0 .SS "Why another Mail Module?" .IX Subsection "Why another Mail Module?" The problem with other Mail:: or Email:: modules on \s-1CPAN\s0 is that they expose more options than the casual user needs. Why create a mailer object, call its accessors and then its \f(CW\*(C`send\*(C'\fR method if all I want to do is call a function that works similarily to the Unix \&\f(CW\*(C`mail\*(C'\fR program? .PP \&\f(CW\*(C`Mail::DWIM\*(C'\fR tries to be as 'Do\-What\-I\-mean' as the venerable Unix \&\f(CW\*(C`mail\*(C'\fR command. Noboby has to read its documentation to use it: .PP .Vb 6 \& $ mail m@perlmeister.com \& Subject: foobar \& quack! quack! \& . \& Cc: \& CTRL\-D .Ve .SH "LEGALESE" .IX Header "LEGALESE" Copyright 2007 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. .SH "AUTHOR" .IX Header "AUTHOR" .Vb 1 \& 2007, Mike Schilli <cpan@perlmeister.com> .Ve .SH "LICENSE" .IX Header "LICENSE" Copyright 2007\-2014 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
Coded With 💗 by
0x6ick