Operating system: CentOS 6.8
1. Install MAILX
Yum Install mail
2. Configure SMTP
Vi/etc/mail.rc
Set from=*** @qq. com
Set smtp-auth-user=*** @qq. com
Set smtp-auth-password=igsre***
Set Smtp-auth=login
Set Ssl-verify=ignore
Set Nss-config-dir=~/.certs
Set smtp=smtps://smtp.qq.com:465
3. Generate SSL Certificate
mkdir ~/.certs certutil-n-D ~/
Download and upload attachments, send text messages and send emails, are commonly used in the program functions, before recording the file upload and download and send text messages, due to the recent busy, the function of the mail to send no time to get, and now finally successfully 163 email to send mail to QQ mailbox, the following is the relevant code, A spec
public void Setemail (){e-Mail ObjectMailMessage mailmessage = new MailMessage ();Sender (site administrator)Mailmessage.from = new MailAddress ("email Address", "book Mall");RecipientMAILMESSAGE.TO.ADD (New MailAddress ("1 Email address", "book Mall Member"));Message subjectMailmessage.subject = "Registration verification of Library store members";Message contentMailmessage.body = "33333";Configuring the Mail
1, we enter into the Aliyun mailbox after we click "Mailbox Settings" and then open to enter after we click "Other mailbox" effect as shown below.
2, then we in the interface we click "Add other Mailboxes", and then according to the prompts us to enter information after we are in the "whether to automatically receive the letter" and "in the original mailbox to keep mail Backup"-"Inbox" will no longer be modified.
3, for the POP server
1. On the standby page, click the "Application" icon.2. Click on the "E-mail" icon. 3. Click on the "Mailbox" icon (here to "QQ Mailbox" as an example). 4. Enter your email address, password, and then click Next. 5. Click "Next" again. tip: To manually set up, click "Manual". 6. Click "Finish" to complete the email settings and automatically enter the email page.
7. Click the "Edit" icon in the upper-ri
The code is as followsPackage Game;import Java.io.bufferedreader;import Java.io.file;import java.io.fileinputstream;import Java.io.ioexception;import Java.io.inputstreamreader;import Java.util.regex.matcher;import Java.util.regex.pattern;public class Main {public static void Main (string[] args) throws IOException { file file =new File ("d:\\index.html"); BufferedReader buf=new BufferedReader (New InputStreamReader (new FileInputStream (file)); String Str=null; Str
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.