Asp. NET environment to send messages using the JMail component

Source: Internet
Author: User
Tags mail root directory visual studio
Asp.net|jmail|jmail Components | sending mail

Configuration environment:. Net Framework 1.1,imai8.02,w3jmail4.3

Implementation process:

Unlike using JMail in ASP, direct use of Server.CreateObject ("Jmail.message") is possible. In a. NET environment, you need to set up.

1. Install jmail4.3

2. Find Jmail.dll (under program Files\dimac\w3jmail4)

3. Executive Program Files\Microsoft Visual Studio. Net\frameworksdk\bin\ildasm.exe (Visual Studio. NET 2003 command Prompt) is available.

The format is as follows: TlbImp c:\Program Files\dimac\w3jmail4\jmail.dll/out:myjmail.dll/namespace:myjmail

After the MyJmail.dll is generated, copy to the bin directory of the web's root directory. In the ASP.net page, use this method to refer to:

Jmail.aspx

<%@ Page language= "C #" contenttype= "text/html"%>

<%@ Import namespace= "Myjmail"%>

<script runat= "Server" >

protected void Page_Load (Object Src, EventArgs E)

{

Message jmail=new message ();

JMail. From= "SSS";

JMail. AddRecipient ("lsg@ckocoo.com", Null,null);

JMail. Mailserverusername= "Brookes";

JMail. Mailserverpassword= "Walkor";

JMail. Subject= "JMail C #";

JMail. Send ("mail.lsg.com", false);

</script>

Tlbimp:

Microsoft. Net Framework Type Library to Assembly Converter


I'm so dizzy, I didn't think. NET has this function ah, I took the above conversion, did send success!! :)



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.