System.Web.Mail, OH MY!
Complete FAQ for sending email in ASP.NET (or trying to) with System.Web.Mail
If you are using .NET 2.0 be sure to check out my
System.Net.Mail
site
»
Home
»
1.0 Introduction
»
2.0 Quickstart Samples
»
3.0 Advanced Samples
»
4.0 Fixing System.Web.Mail
»
5.0 More Resources
»
6.0 RFCs
»
7.0 Third Party Products
»
Complete FAQ
»
Submit Comments
»
About Me
»
About My Products
»
Site Index
Sponsored by
www.aspnetemail.com
System.Web.Mail FAQ
1 Introduction
1.1 What is System.Web.Mail?
1.2 What is the .NET Framework ?
1.3 What do I need to send email in .NET?
1.4 What is a relay server?
1.5 Is System.Web.Mail really a wrapper around the COM CDONTS and CDOSYS?
1.6 What is the IIS SMTP Service?
1.7 Can System.Web.Mail read email?
2 Quickstart Programming Samples
2.1 How do I send a simple email?
2.2 How do I send a simple Html email?
2.3 How do I send an email with attachments?
2.4 How do I change the FROM address to a friendly name?
2.5 How do I change the TO address to a friendly name?
2.6 How do I specify multiple recipients?
2.7 How do I add the Reply-To header to the MailMessage?
2.8 How do I add custom headers to the MailMessage?
2.9 How do I change the port number?
3 Advanced Programming Samples
3.1 How do I send non US-ASCII emails?
3.2 How do I send a web page?
3.3 How do I embed images in an email?
3.4 How do I email a website exception
3.5 How do I encrypt messages using s/mime or pgp?
3.6 How do I send multipart/related emails?
3.7 How do I send multipart/alternative emails?
3.8 How do I authenticate to send an email?
4 Troubleshooting System.Web.Mail
4.1 A Word About Exceptions (
READ THIS FIRST
)
4.2 Namespace/COM/DLL Related Exceptions
4.2.1 Error loading type library/DLL.
4.2.10 "Could not access 'CDO.Message' Object - Part 8
4.2.11 "Could not access 'CDO.Message' Object - Part 9
4.2.2 The "SendUsing" configuration value is invalid.
4.2.3 The scary "Could not access 'CDO.Message' object"
4.2.4 "Could not access 'CDO.Message' Object - Part 2
4.2.5 "Could not access 'CDO.Message' Object - Part 3
4.2.6 "Could not access 'CDO.Message' Object - Part 4
4.2.7 "Could not access 'CDO.Message' Object - Part 5
4.2.8 "Could not access 'CDO.Message' Object - Part 6
4.2.9 "Could not access 'CDO.Message' Object - Part 7
4.3 SMTP Protocol/Network Related Exceptions
4.3.1 The server specified in the SmtpServer property is not valid or not available
4.3.10 Can send locally but not externally.
4.3.11 550 x.x.x Unable to relay for xxxxx.
4.3.2 [COMException (0x8004020f): The server rejected one or more recipient addresses."]
4.3.3 Some of emails are rejected by some clients, but not all.
4.3.4 My mail server requires authentication. (503 This mail server requires authentication)
4.3.5 Not a gateway or local host.
4.3.6 The specified protocol is unknown.
4.3.7 The specified protocol is unknown. Part 2
4.3.8 The server response was 452 Filesystem error - message not accepted.
4.3.9 The transport failed to connect to the server.
4.4 Other Problems/Exceptions
4.4.1 How can I stream attachments into the MailMessage?
4.4.2 How can I create an attachment from a string?
4.4.3 Why does System.Web.Mail work in development and not in production?
4.4.4 I keep getting question marks (?'s) in my email, where characters should be.
4.4.5 System.Web.Mail is truncating the message body.
4.4.6 Attachments added to the MailMessge are corrupt.
4.4.7 All of my emails are ending up in the /badmail directory.
4.4.8 System.Web.Mail is corrupting my PDF attachments, what gives?
5 Additional Resources
5.1 Community Help
5.1.1 Yahoo .NET Email List
5.1.2 Aspadvice ASP.NET Lists
5.1.3 Microsoft Newsgroups
5.2 Other Helpful Links
5.2.1 Email tutorials on www.123aspx.com
5.2.10 HOWTO: Send E-mail Programmatically with System.Web.Mail and Visual C# .NET
5.2.11 Periods at the Beginning of a Line Are Removed When Placed into the SMTP Pickup Directory
5.2.2 SMTP server and email FAQ at the ASP.NET Forums
5.2.3 System.Web.Mail Namespace
5.2.4 Manage Your Company's E-mail with the Windows 2000 SMTP Service
5.2.5 XCON: Cannot Send E-Mail Messages to a Growing List of Domains
5.2.6 Read Access to the Everyone Group Is Removed After You Install Exchange 2000 SP3
5.2.7 HOWTO: Use CDO (1.x) to Set Up Reply to Alternate Recipient
5.2.8 INFO: Process and Request Identity in ASP.NET
5.2.9 PRB: Collaboration Data Objects for Windows NT, Collaboration Data Objects for
Windows 2000, and Collaboration Data Objects for Exchange 2000 Require Outlook Express
6 RFCs for sending, receiving, and parsing email.
6.1 Send (SMTP) Email RFCs
6.1.1 RFC 2821 Simple Mail Transfer Protocol (SMTP)
6.1.10 RFC 2852 Deliver By SMTP Service Extension
6.1.11 RFC 2034 SMTP Service Extension for Returning Enhanced Error Codes
6.1.12 RFC 3463 Enhanced Mail System Status Codes
6.1.13 RFC 3461 SMTP Service Extension for Delivery Status Notifications
6.1.14 RFC 3462 Multipart/Report Content Type for the Reporting of Mail System Administrative Messages
6.1.15 RFC 2554 SMTP Service Extension for Authentication
6.1.16 RFC 2505 Anti-Spam Recommendations for SMTP MTAs
6.1.17 RFC 2442 Batch SMTP Media Type
6.1.18 RFC 1047 Duplicate messages and SMTP
6.1.2 RFC 974 Mail routing and the domain system (MX records)
6.1.3 RFC 1869 SMTP Service Extensions
6.1.4 RFC 1870 SMTP Service Extension for Message Size Declaration
6.1.5 RFC 1652 SMTP Service Extension for 8bit-MIMEtransport
6.1.6 RFC 3030 SMTP Service Extensions for Transmission of Large and Binary MIME Messages
6.1.7 RFC 1846 SMTP 521 Reply Code
6.1.8 RFC 1985 SMTP Service Extension for Remote Message Queue Starting (ETRN)
6.1.9 RFC 2645 On-Demand Mail Relay (ODMR) SMTP with Dynamic IP Addresses
6.2 Receiving (POP3/IMAP) Email RFCs
6.2.1 RFC 2298 Extensible Message Format for Message Disposition Notifications (MDNs)
6.2.10 RFC 1731 IMAP4 Authentication Mechanisms
6.2.11 RFC 2342 IMAP4 Namespace
6.2.12 RFC 2359 IMAP4 UIDPLUS extension
6.2.13 RFC 3348 IMAP4 Child Mailbox Extension
6.2.14 RFC 2683 IMAP4 Implementation Recommendations
6.2.15 RFC 2971 IMAP4 ID extension
6.2.16 RFC 3502 IMAP MULTIAPPEND Extension
6.2.17 RFC 3503 Message Disposition Notification (MDN) profile for IMAP
6.2.18 RFC 3516 IMAP4 Binary Content Extension
6.2.19 RFC 2476 Message Submission
6.2.2 RFC 1939 Post Office Protocol - Version 3 (POP3)
6.2.20 RFC 2244 ACAP -- Application Configuration Access Protocol
6.2.21 RFC 1056 PCMAIL: A distributed mail system for personal computers
6.2.22 RFC 1204 Message Posting Protocol (MPP)
6.2.23 RFC 1339 Remote Mail Checking Protocol
6.2.3 RFC 1734 - POP3 AUTHentication command
6.2.4 RFC 1957 Some Observations on Implementations of POP3
6.2.5 RFC 2384 POP URL Scheme
6.2.6 RFC 2449 POP3 Extension Mechanism
6.2.7 RFC 3206 SYS and AUTH POP Response Codes
6.2.8 RFC 2195 IMAP/POP AUTHorize Extension for Simple Challenge/Response
6.2.9 RFC 3501 Internet Message Access Protocol - version 4rev1(IMAP4)
6.3 Parsing (MIME/Multipart Messages) Email RFCs
6.3.1 RFC 2822 Internet Message Format
6.3.10 RFC 2049 MIME Part 5: Conformance Criteria and Examples
6.3.11 RFC 2183 Communicating Presentation Information in Internet Messages: The Content-Disposition Header
6.3.12 RFC 2557 MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)
6.3.13 RFC 2854 text/html Media Type
6.3.14 RFC 2392 Content-ID and Message-ID Uniform Resource Locators
6.3.15 RFC 2646 Text/Plain Format Parameter
6.3.16 RFC 2387 MIME Multipart/Related Content-type
6.3.17 RFC 3066 Tags for the Identification of Languages
6.3.18 RFC 2231 MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations
6.3.19 RFC 2017 Definition of the URL MIME External-Body Access-Type
6.3.2 RFC 2076 Common Internet Message Headers
6.3.20 RFC 2388 Returning Values from Forms: multipart/form-data
6.3.21 RFC 2376 XML Media Types
6.3.22 RFC 1556 Handling of Bi-directional Texts in MIME
6.3.23 RFC 1524 User Agent Configuration Mechanism For Multimedia Mail Format Information
6.3.24 RFC 1896 MIME text/enriched content-type
6.3.25 RFC 1428 Transition of Internet Mail from Just-Send-8 to 8bit-SMTP/MIME
6.3.26 RFC 1740 MIME Encapsulation of Macintosh Files (MacMIME)
6.3.27 RFC 1741 MIME Content Type for BinHex Encoded Files
6.3.28 RFC 1767 MIME Encapsulation of EDI Objects
6.3.29 RFC 1844 Multimedia E-mail (MIME) User Agent Checklist
6.3.3 RFC 1153 Digest message format
6.3.30 RFC 1864 Content-MD5 Header Field
6.3.31 RFC 2077 The Model Primary Content Type for MIME
6.3.32 RFC 3023 XML Media Types
6.3.4 RFC 1505 Encoding Header Field for Internet Messages
6.3.5 RFC 1049 Content-type header field for Internet messages
6.3.6 RFC 2045 MIME Part 1: Format of Internet Message Bodies
6.3.7 RFC 2046 MIME Part 2: Media Types
6.3.8 RFC 2047 MIME Part 3: Message Header Extensions for Non-ASCII Text
6.3.9 RFC 2048 MIME Part 4: Registration Procedures
7 Third Party Products
7.1 Advanced Intellect - My Email Components
7.1.1 aspNetEmail SMTP Component
7.1.2 aspNetMime Mime Parsing Component
7.1.3 aspNetPOP3 POP3 Component
7.1.4 ListNanny NDR/Bounced Email Parsing Component
7.2 Abderaware
7.3 Quiksoft
Copyright © 2004 Contact:
Dave Wanta
.
aspNetEmail
aspNetPOP3
aspNetMime