Use the jmail component to send emails in the ASP. NET Environment [add to favorites]
Posted on Tang. Net reading (1664) Comments (5) EDIT favorites reference favorites to 365key category: Technical Accumulation Use the jmail component to send emails in ASP. NET Environment
Configuration environment:. NET Framework 1.1, imai8.02, w3jmail4.3
Implementation process:
Unlike jmail in ASP, server. Createobject ("jmail. Message") can be used directly. In the. NET environment, you need to set.
1. Install jmail4.3
2. Find jmail. dll (under program files/dimac/w3jmail4)
3. Run program files/Microsoft Visual Studio. NET/frameworksdk/bin/ildasm.exe (you can use the Visual Studio. NET 2003 command prompt ),
Format: tlbimp C:/program files/dimac/w3jmail4/jmail. dll/out: myjmail. dll/namespace: myjmail
After myjmail. dll is generated, copy it to the bin directory of the Web root directory. On the ASP. NET page, use this method to reference:
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 = "encrypted or ";
Jmail. Subject = "jmail C #";
Jmail. Send ("mail.lsg.com", false );
</SCRIPT>
Tlbimp:
Microsoft. NET Framework Type Library to Assembly Converter
I was dizzy. I didn't expect this function in. net. I switched it as shown above, and it was actually sent !! :)