ASP. NET jmail method and Solution

Source: Internet
Author: User

recent projects require sending emails. jmail has not been used for a long time and is not officially supported by jmail. net version, so some problems are encountered, to avoid detours and write down the following content,
my jmail version is 4.3
you need to extract jmail in.
1. download jmail4.3 and search for the ghost on the Internet and install it.
2. find jmail. DLL (under Program Files \ dimac \ w3jmail4)
3. run Program Files \ Microsoft Visual Studio 8 \ Vc \ ildasm.exe c: \ Program Files \ dimac \ w3jmail4 \ jmail. dll/out: myjmail. dll/namespace: myjmail
cannot be generated because it does not support the "Program Files" folder in DOS, you copy it to nothing else and generate myjmail according to the above method. DLL.
4. set myjmail. dll can be referenced to your project.

Notes
| 1. user name and password
InCodeTo write
MSG .. mailserverusername = "username"
MSG. mailserverpassword = "password"
Or
MSG. Send ("User name: password @ server.net ")
The username and password of the email server to which the sender connects. The user name and password must exist on the server and be correct. It seems that the username and password should not be underlined.
2. the firewall blocks network communication or network faults
It is possible that the firewall will think this is a worm-caused mass mailing situation, so it will prohibit mass mailing.
Therefore, you may find the firewall settings.
3. The jmail component has insufficient permissions.
4. email server fault

Jmail code Myjmail. Message jmail =   New Myjmail. Message ();
Jmail. contenttype = " Text/html " ;
Jmail. Silent = False ;
Jmail. Logging = True ;
Jmail. charset = " Gb2312 " ;
Jmail. addrecipient ( " Toemail " , "" , "" );
Jmail. From = " Fromemail " ;
Jmail. mailserverusername = " Username " ; // Note: The username must be full and should not be underlined.
Jmail. mailserverpassword = " Password " ; // Password with no underlines
Jmail. Subject = " Topic " ;
Jmail. Body = " Content " ;
Jmail. Send ( " Smtp.126.com " , False );
Jmail. Close ();

Note: I have uploaded the generated code for everyone to download the http://files.cnblogs.com/daxia/myJmail.rar

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.