Send an email with Jmail

xiaoxiao2021-03-06  87

First go to http://www.dimac.net/, its official download JMail4.4 version, click on Download on the home page, the official also provides a trial version of Jmail Server. But its Jmail is free, too Commercial version, free version of the function is restricted, if the recipient function has a problem, it is incompatible for some codes of the domestic post office. First register with Regsvr32 Jmail.dll, then add reference Jmail.dll in your project. See the following codes: public string SendPassword () {jmail.Message MailObj = new jmail.MessageClass (); MailObj.From = "xxxx @ 163com"; // address of the sender MailObj.Logging = true; MailObj.MailServerUserName = " XXXX "; // sender username Mailobj.mailServerPassword =" xxxxxxx "; // server verification mailobj.htmlbody =" Hello, welcome to see this post, ^ _ ^: "; mailobj.charset =" GB2312 "; mailobj. Subject = "Hello"; mailobj.fromname = "hey"; mailobj.addrecipient (xxxx@xxxx.com, "user", "a"); // Add recipient mailobj.Priority = 3; // Send IF (Mailobj .Send ("SMTP.163.com", false)) {Return "Success";} else {return "fail";} OK, its sending function is so simple.

Posted on August 28, 2004 5:17 PM

Reprinted to the stupid cat blog: http://blog.9cbs.net/jabby12/

转载请注明原文地址:https://www.9cbs.com/read-122309.html

New Post(0)