Sending CDO email through SmarterMail?

I want to send CDO email through the SmarterMail installed on my server. My reason for doing this is that SmarterMail sends through a different IP address. The IP address used by the IIS SMTP server has been banned by Yahoo and no emails go through to Yahoo when sent using that IP, but they do go through when sent through the IP SmarterMail uses. I have Outlook Express set up on the server and am able to send through the SmarterMail set up using the following settings:

Incoming mail server: 127.0.0.1
Outgoing mail server: 127.0.0.1
Account name: domain@domain.com (using the email address already set up on SmarterMail with one of my domains)
Password: xxxx

However, when I try to use these settings in my Functions file that specifies the mail server, it just ignores them and continues to send email through the IIS server. I'm sure it is still sending through the IIS server since the IP used is the one you see when you send email through the IIS server and also email didn't work when I stopped the IIS SMTP Service temporarily.

Any suggestions? The headers of the emails and the code from the Functions file are attached as Code below.

Thanks in Advance,
Bill
This is the code from our Functions file:
 
''''''''''''''''''''''''''''''''' Send Email '''''''''''''''''''''''''''''''''''
	
	Public Function SendEmailMessage(ByVal strFromAddress, ByVal strToAddress, ByVal strSubject, ByVal strHTMLBody)
	
	    SendEmailMessage = SendEmailMessageWithAttachment(strFromAddress,strToAddress,strSubject,strHTMLBody,"")
				
	End Function
	
	'''''''''''''''''''''''''''
	
	Public Function SendEmailMessageWithAttachment(strFromAddress, strToAddress, strSubject, strHTMLBody, strAttachmentPath)
	
	    Const cdoSendUsingPort = 2
	    
		Set objMail= Server.CreateObject("CDO.Message")
		
		Const cdoIIS = 1
									
		With objMail				
		    '.Configuration.Load cdoIIS
			.From = strFromAddress
			.To = strToAddress
			.Subject = strSubject
			.HTMLBody = strHTMLBody
			
			If strAttachmentPath<>"" Then .AddAttachment strAttachmentPath
			
            .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =  "http://127.0.0.1"
            .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
            .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = "2"
            .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "domain@domain.com"
            .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxxxxx"
			
			.Configuration.Fields.Update
			
			.Send
		End With 
					
		Set objMail = Nothing
		
		If Err.number=0 Then
			SendEmailMessageWithAttachment=True
		Else
			SendEmailMessageWithAttachment=False
		End If
					
	End Function
 
Here are the headers of an email sent from the server using Outlook Express (domains and IP's changed):
 
Delivered-To: bill@bill.com
Received: by 10.231.34.9 with SMTP id j9cs52712ibd;
        Fri, 22 May 2009 12:06:11 -0700 (PDT)
Received: by 10.151.98.17 with SMTP id a17mr8010839ybm.301.1243019170581;
        Fri, 22 May 2009 12:06:10 -0700 (PDT)
Return-Path: <domain@domain.com>
Received: from mail.domain.com (mail.domain.com [xx.xxx.xxx.57])
        by mx.google.com with ESMTP id 1si6664697gxk.92.2009.05.22.12.06.09;
        Fri, 22 May 2009 12:06:10 -0700 (PDT)
Received-SPF: neutral (google.com: xx.xxx.xxx.57 is neither permitted nor denied by best guess record for domain of domain@domain.com) client-ip=xx.xxx.xxx.57;
Authentication-Results: mx.google.com; spf=neutral (google.com: xx.xxx.xxx.57 is neither permitted nor denied by best guess record for domain of domain@domain.com) smtp.mail=domain@domain.com
Received: from nb7765 [127.0.0.1] by mail.domain.com with SMTP;
   Fri, 22 May 2009 14:05:43 -0500
Message-ID: <8BAF235E3F934E5C9795E76155C7D129@sv2234>
From: "User" <domain@domain.com>
To: <something@gmail.com>
Subject: test email
Date: Fri, 22 May 2009 14:05:43 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	format=flowed;
	charset="iso-8859-1";
	reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.3790.3959
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325
 
kjkjkjkj
 
And here are the headers of an email produced using the settings in the Functions file to send form results:
 
Delivered-To: Something@gmail.com
Received: by 10.231.34.9 with SMTP id j9cs53125ibd;
        Fri, 22 May 2009 12:11:34 -0700 (PDT)
Received: by 10.151.129.12 with SMTP id g12mr8227083ybn.220.1243019494126;
        Fri, 22 May 2009 12:11:34 -0700 (PDT)
Return-Path: <domain@domain.com>
Received: from mail.domain.com ([xx.xxx.xxx.72])
        by mx.google.com with ESMTP id 12si6141601gxk.112.2009.05.22.12.11.33;
        Fri, 22 May 2009 12:11:33 -0700 (PDT)
Received-SPF: neutral (google.com: xx.xxx.xxx.72 is neither permitted nor denied by best guess record for domain of domain@domain.com) client-ip=xx.xxx.xxx.72;
Authentication-Results: mx.google.com; spf=neutral (google.com: xx.xxx.xxx.72 is neither permitted nor denied by best guess record for domain of domain@domain.com) smtp.mail=domain@domain.com
Received: from sv2234 ([10.10.236.90]) by mail.domain.com with Microsoft SMTPSVC(6.0.3790.3959);
	 Fri, 22 May 2009 14:11:27 -0500
thread-index: AcnbERtmIUKQKQFdTU2twAALuw4Fbw==
Thread-Topic: Referral from domain
From: <domain@domain.com>
To: <Something@gmail.com>
Subject: Referral from domain
Date: Fri, 22 May 2009 14:11:27 -0500
Message-ID: <86C0A9F5ABD94116B39C01B71F0DF09C@sv2234>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0B5E_01C9DAE7.3290A2D0"
X-Mailer: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325
Return-Path: domain@domain.com
X-OriginalArrivalTime: 22 May 2009 19:11:27.0741 (UTC) FILETIME=[1B66AAD0:01C9DB11]
 
This is a multi-part message in MIME format.
 
------=_NextPart_000_0B5E_01C9DAE7.3290A2D0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
 
Notice that the IP address in the first header is different from the IP address in the second (xx.xxx.xxx.72 vs xx.xxx.xxx.57). I want all email to go out stamped with xx.xxx.xxx.57, not xx.xxx.xxx.72.

Open in new window

VANCOUVER47Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

meverestCommented:
Hi,

just set your 'smartermail' ip address in the 'smarthost' field of your IIS smtp server.

cheers.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Borgs8472Commented:
Might it be possible that is the IIS IP is blocked, routing via it would increase the chance of the smarter mail IP being banned? I wouldn't risk it.

Since IIS SMTP is running its likely conflicting with the smartermail SMTP service. Stop and disable IIS smtp (well its banned so...) and mess around starting the correct service, make sure its listening on 127.0.0.1, or point your app at whatever IP it is listening on.
0
VANCOUVER47Author Commented:
The problem actually resolved itself since Yahoo stopped blocking the IP address that was a problem. I tried everything I could think of, as well as all solutions given, and nothing worked. Time to move on - thanks for you help, guys!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.