Use the jmail component to send emails in the ASP. NET Environment [add to favorites]

Source: Internet
Author: User
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 !! :)

 

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.