Configuration environment: .NET Framework 1.1, IMAI8.02, W3JMail4.3
Implementation process:
Unlike the use of Jmail in ASP, you can use Server.createObject ("Jmail.Message"). In the .NET environment, you need to set it.
1. Install JMail4.3
2. Locate Jmail.dll (Program Files / Dimac / W3JMail4)
3. Execute Program Files / Microsoft Visual Studio .NET / FRAMEWORKSDK / BIN / ILDASM.EXE (you can use the Visual Studio .NET 2003 command prompt),
The format is as follows: TLBIMP C: / Program Files / Dimac / w3jmail4 / jmail.dll /out:mymail.dll / namespace: myjmail
After generating myjmail.dll, Copy to the root directory of the root directory of the Web. In the ASP.NET page, use this method to quote:
Jmail.aspx
<% @ Page language = "c #" ContentType = "text / html"%>
<% @ Import namespace = "myjmail"%>
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