ASP Sending e-mail with CDOSYS |
ASP Sending e-mail with CDOSYS |
Apr 29 2008, 20:51
Post
#1
|
|
Advanced Member Group: Members Posts: 3,005 Joined: 11-September 07 Member No.: 2 |
ASP Sending e-mail with CDOSYS:
QUOTE Sending e-mail with CDOSYS CDO (Collaboration Data Objects) is a Microsoft technology that is designed to simplify the creation of messaging applications. CDOSYS is a built-in component in ASP. We will show you how to use this component to send e-mail with ASP. How about CDONTs? Microsoft has discontinued the use of CDONTs on Windows 2000, Windows XP and Windows 2003. If you have used CDONTs in your ASP applications, you should update the code and use the new CDO technology. CODE <% Set myMail=CreateObject("CDO.Message") myMail.Subject="Sending email with CDO" myMail.From="mymail@mydomain.com" myMail.To="someone@somedomain.com" myMail.TextBody="This is a message." myMail.Send set myMail=nothing %> Bron: http://www.w3schools.com/asp/asp_send_email.asp |
|
|
Apr 29 2008, 20:52
Post
#2
|
|
Advanced Member Group: Members Posts: 3,005 Joined: 11-September 07 Member No.: 2 |
Handig om te weten:
"Why is e-mail to certain domains being rejected?" QUOTE Why is e-mail to certain domains being rejected? Whether you're using CDO, XP_SMTP_SendMail, or a 3rd party COM object to send mail, you may have experienced this problem. Your mail works some of the time — but doesn't work either when the mail is intended for your own domain, or it only works when the mail is intended for your own domain. Here are some things to check that will hopefully help resolve the issue. Many of these suggestions will require some input, and possibly some work, from your network and/or Exchange administrator. Make sure that the FROM address associated with your messages is a valid address on your domain. Check your SMTP logs, the event log, and the drop / badmail folders. You might find something like this: The server rejected the sender address. The server response was: 501 5.1.8 Domain of sender address <foo>@<blat>.com does not exist Even if you don't see this message, it might be that Exchange or your SMTP server are willing to just forward along mail from any address if the destination is outside of your network, but will only retain internal mail if the sender address is valid. Make sure DNS is not an issue. For example, depending on how your network is set up, the SMTP relayer within your domain may be unable to externally resolve yourdomain.com. You might also check that if you are using an external SMTP server, that your firewall or proxy is not somehow blocking mail that is going out and coming back in. If mail only works when sent to your domain, it might be that your firewall or proxy is blocking such mail from leaving your network (e.g. the firewall might be blocking outbound traffic on port 25, in general or only from specific machines). If you are using an Exchange server, make sure that it has not disabled all external relaying regardless of sender address. Check with your Exchange administrator for potential permissions, firewall, proxy, or domain-based issues. Consider using the local SMTP server instead of forwarding on to Exchange for processing. If you are using the SMTP virtual server within IIS, make sure that you have not set an explicit include/exclude list. In Internet Services Manager, right-click the SMTP server, hit Properties, and on the Access tab, check Connection... and Relay... Also, consider configuring IIS to use a remote SMTP server as a "smart host" relayer, instead of handling all the mail internally. See the Delivery tab, Advanced. For further information, see KB #293800 for Windows 2000, and KB #324272 and KB #816121 for Windows Server 2003. If Exchange or your SMTP server are set to try local delivery and then forward on to an external SMTP relayer for addresses that aren't in your domain, make sure that the external relayer does not require SMTP authentication. If so, you may need to handle this correctly — see Article #2026 for a code sample that uses CDO.Message to send to an SMTP server that requires outgoing authentication. Another option to bypass problems from within your network is to forward all mail to an external SMTP server, such as your ISP. This will avoid problems with a local SMTP server, and Exchange server configurations... but if you can't get outbound on port 25, you'll have to fix that issue first. For information on testing your SMTP service in Windows 2000, see KB #286421. To test SMTP services in Windows Server 2003, see KB #323350. We hope that this information is useful. If you know of other potential workarounds, please let us know. Bron: http://classicasp.aspfaq.com/email/why-is-...g-rejected.html |
|
|
Lo-Fi Version | Time is now: 16th November 2024 - 16:04 |