简体   繁体   中英

sending email using cdo & classic asp on dedicated server (memset) in IIS6?

Firstly I am new to setting up a server so appologies for being dumb.

I have a website which is hosted on a provider called memset its a 2008r2 box using ms sql 2012. My domain was bought from my 1and1.co.uk account and the dns is pointing to my site - all working fine - site works! However in using cdo to send mail in a classic asp page I am struggling to understand how - what i should do.

I did create some email accounts on 1and1... but am unsure if this is correct or if i should do something different? I have set the site up to use iis7, and installed iis6 / smtp server on 2008r2.

How should i configure iis6? should i send it via my new server i am creating - or forward the emails to 1and1 - and if so how do i do this? is this to do with smart host at all ??

So confused.

I am a web / dba developer by trade - not a server manager.

Running Classic ASP on IIS 7.x Checklist:

(1) Do not name site folders with .com, .net, etc at the end.

(2) Create NEW user account: - [app pool user identity] is user: app_pool_blahblahblah, pw: xxxxxx

(3) In Server Manager, right click "Web Server (IIS)" and choose "Add Role Services". Add IIS 6 Management Compatibility.

(4) In Server Manager under features add SMTP server. Install IIS6 Resource Kit so you can Use Metabase Explorer. Grant the [app pool user identity] user read access to the /Local Machine/SmtpSvc/ and /Local Machine/SmtpSvc/1/ nodes in the IIS Metabas

(5) In Application Pool, advanced settings: - set .Net Framework version to "v2.0" <-- fixed issue with default asp doc not working! - set "Enable 32-bit applications" to TRUE. - set managed pipeline mode to "Classic". <-- this may not be necessary. - under Process Model, change Identity to "[app pool user identity]" account we created. - be sure "load user profile" is set to FALSE. - be sure "maximum worker processes" is "1".

(6) Mail: In IIS 6 Management Console: http://intellitect.com/configuring-windows-smtp-server-on-windows-2008-for-relay/ - Under SMTP Virtual Server Properties: -- "Access" Tab --> Relay: add IPs of this box, including 127.0.0.1 -- "Delivery" Tab --> Advanced: for "fully qualified domain name" put name of box -- "Delivery" Tab --> Advanced: for "smart host" put "dedrelay.secureserver.net" -- "Delivery" Tab --> Outbound connections: Make sure limits are set to 100. -- "Security" Tab --> add "[app pool user identity]" and IIS_IUSRS

(7) In IIS 7.5 under web site: - Under ASP: -- ONLY IF PROBLEM: set enable buffering to "false" -- under limits change max req entity and buffering limit to 1024000000 -- set script language to "vbscript" -- set "send errors to browser" to true - Authentication --> edit "Anonymous Authentication" and set to app pool identity.
- ONLY IF PROBLEM: under error pages: under 404 set to "/home.asp" and "execute URL" - ONLY IF PROBLEM: edit c:\\windows\\system32\\inetsrv\\config\\applicationHost.config: change to "Allow" - under Management (at bottom) go into "Configuration Editor". -- In the dropdown go to System.web --> http runtime and change maxRequestLength to 1024000000 -- In the dropdown go to System.webserver/security/requestFiltering --> chg allowDoubleEscaping=true

(8) Set "Modify" Permissions for [app pool user identity] for the following folders: - your web site - windows\\temp - inetpub\\temp - inetpub\\mailroot - ONLY IF PROBLEM: windows\\serviceprofiles\\networkservice\\AppData\\Local\\Temp?

AND Set Permissions in registry: - ONLY IF PROBLEM: HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Jet\\4.0\\Engines?

FOR THESE USER ACCOUNTS: - IIS_IUSRS - [app pool user identity] - NETWORK SERVICE

(9) Install and Use Process Monitor to find permissions issues - filter

(10) Make sure SSL v2 is not being used: Click Start, click Run, type regedit, and then click OK. In Registry Editor, locate the following registry key/folder: HKey_Local_Machine\\System\\CurrentControlSet\\Control\\SecurityProviders \\SCHANNEL\\Protocols\\SSL 2.0 Right-click on the SSL 2.0 folder and select New and then click Key. Name the new folder Server. Inside the Server folder, click the Edit menu, select New, and click DWORD (32-bit) Value. Enter Enabled as the name and hit Enter. Ensure that it shows 0x00000000 (0) under the Data column (it should by default). If it doesn't, right-click and select Modify and enter 0 as the Value data. Restart the computer. Verify that no SSL 2.0 ciphers are available at ServerSniff.net or the Public SSL Server Database

(11) SSL issue where Safari tells client that it needs a certificate. - Go into IIS settings for the SSL-protected site. - Click on "SSL Settings" - Choose "ignore".

If you need to send emails, I found that using the Mandrill Email API worked for me (mandrill.com). I am using Classic ASP and was having issues on my web host to do with exceeding the monthly limit for emails sent using their mail servers.

I had to learn a bit about how to use JSON and Classic ASP but it was worth the time.

If you need any example code for how to do it, let me know, would be happy to help.

At least if you do that it'll save you a lot of server config and setup work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM