Class | Description |
---|---|
Mailer |
Used to send email.
If the mail server is not in local network and "http proxy server" is needed to connect Internet, then the VM properties -Dhttp.proxyHost and -Dhttp.proxyPort are required to avoid the connection problem. Examples: java org.safs.tools.logs.Mailer -h to get help information of this program java org.safs.tools.logs.Mailer -to user@yourCompany.com -sub "Don not reply this email!" -msg "Helooooo mail coming" -type text/plain send to user a plain text "Helooooo mail coming" with subject "Don not reply this email!" java org.safs.tools.logs.Mailer -to user@yourCompany.com -sub "Don not reply this email!" -msg "<h1>Helooooo mail coming</h1>" -type text/html send to user an html text "<h1>Helooooo mail coming</h1>" with subject "Don not reply this email!" java org.safs.tools.logs.Mailer -to user1@yourCompany.com;user2@yourCompany.com -sub "Don not reply this email!" -msg "Helooooo mail coming" -type text/plain send to user1 and user2 a plain text "Helooooo mail coming" with subject "Don not reply this email!" java org.safs.tools.logs.Mailer -to user1@yourCompany.com -cc user2@yourCompany.com -sub "Don not reply this email!" -msg "Helooooo mail coming" -type text/plain send to user1 a plain text "Helooooo mail coming" with subject "Don not reply this email!", at the same time this email will be cc to user2 java org.safs.tools.logs.Mailer -to user@yourCompany.com -sub "Don not reply this email!" -msg "Helooooo mail coming" -type text/plain -attach "C:\yourpath\afile.txt" send to user a plain text "Helooooo mail coming" with subject "Don not reply this email!" with attached file as "afile.txt" java org.safs.tools.logs.Mailer -to user@yourCompany.com -sub "Don not reply this email!" -msg "Helooooo mail coming" -type text/plain -attach "C:\yourpath\afile.txt=alias.txt" send to user a plain text "Helooooo mail coming" with subject "Don not reply this email!" with attached file as "alias.txt" java org.safs.tools.logs.Mailer -to user@yourCompany.com -sub "Don not reply this email!" -msg "Helooooo mail coming" -type text/plain –attach "C:\yourpath\test.bat=test.bat.remove;C:\safs\lib\safsmail.jar=mail.jar.removeme;C:\safs\lib\windowsclassmap.dat" send to user a plain text "Helooooo mail coming" with subject "Don not reply this email!" with multiple attached file as "test.bat.remove", "mail.jar.removeme" and "windowsclassmap.dat" |
Mailer.MimeContent |
Enum | Description |
---|---|
Mailer.MimeType | |
Mailer.Protocol |
Copyright © SAS Institute. All Rights Reserved.