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!! :)