Solved

IIS 6.0 SMTP virtual server setup

Posted on 2008-06-20
15
491 Views
Last Modified: 2011-10-19
Hi,

 I am using CDO from my VB code to send automated emails. I did not configure the default SMTP server at alll, but it works fine for emails on my intranet. Now I want to be able to send email to "yahoo.com" or any other email address. Please let me know how to configure the IIS SMTP to do that. I added "smtp.yahoo.com" to the domain name, but it still doesnt send out the emails.They get stuck in the queue. If possible, please point me to a resource on how to configure this server.

Thanks
Quantster
0
Comment
Question by:Quantster
  • 9
  • 3
  • 2
  • +1
15 Comments
 
LVL 7

Expert Comment

by:dineesh
ID: 21831986
Hi,

use your mail server as the smtp server. this way your program will use your mail server to send out mails and will not be marked as spam by receipent servers.

0
 

Author Comment

by:Quantster
ID: 21832340
Hi Dineesh,

 Thanks for your reply. Could you tell me how to do that.

Thanks
Abhishek
0
 
LVL 7

Expert Comment

by:60MXG
ID: 21833126
Set up a WebMail (SMTP Virtual Server) in your IIS first then Right mouse Click on the SMTP Virtual Server and select Property.  In the General Tab you need to put in the IP Address of your current internal mail server.  In the Access Tab, make sure "Authentication" button and select "Anonymous access", "Basic authentication", and "Windows security package" are selected.  At the same time, make sure you enter the IP Address of all the servers/workstations into the Connection Pool.  Finally you need to add all the user group in your organization into the Security tab.  Hope you can figure it out!
0
 

Author Comment

by:Quantster
ID: 21833199
Thanks for your reply. I will give this a try and let you know how it worked out for me.

Thanks
Abhishek
0
 

Author Comment

by:Quantster
ID: 21833239
Hi 60MXG,

I am using the following CDO code to send email. If possible please let know if it will change in any way. I mean do I have to add authentication to it now.

Thanks
Quantster

CODE:


Public Sub SendEmailViaOE(AttachememtPath As String, FromEmail As String, ToEmail As String, Subject As String)
Dim objOutlook As Outlook.NameSpace
Dim objNewMail As Outlook.MailItem
Dim testvar As Variant

Dim cd As CDO.Message
Set cd = New CDO.Message
cd.Subject = Subject
cd.To = ToEmail
cd.From = FromEmail
cd.AddAttachment AttachememtPath
cd.TextBody = "Hello this Brent"
'cd.AddRelatedBodyPart "c:\txtVes.txt", "ss", cdoRefTypeId
cd.Send

Set cd = Nothing
End Sub
0
 
LVL 7

Expert Comment

by:dineesh
ID: 21833725
hi,

please chane the attachment and make chages to yout from & to mail id's and the mail server also
cdomail.txt
0
 

Author Comment

by:Quantster
ID: 21833878
Thanks a lot guys.I will give this solutions a try. Hopefully it will work for me. I will let you guys know how it goes.

Thanks
Quantster
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Quantster
ID: 21833918
Hi dineesh,

 Most of the code is self explanatory. There is one line i wasnt able to understaned. If possible please tell me what this line is doing

"http://schemas.microsoft.com/cdo/configuration/sendusing" = 2
0
 

Author Comment

by:Quantster
ID: 21833976
Guys you have been really helpful so far. But there is another problem. The IT guys out here actually lock down the smtp port (port 25). So you cannot access it. Is there any qya to send email into the internet without using the local excahnge server. That would be really great.
0
 
LVL 7

Expert Comment

by:60MXG
ID: 21835103
I think you need to talk to the network guys to open up the SMTP port for outgoing/incoming mails.  I am sure that's the problem.  We used to have the same problems but after I explained my situation to the network guys, they open up the ports for incoming/outgoing mail,  the send/receive mails problems are gone.  Regarding the authentication issue you can try to use the Anonymous access.  If you can email to people inside the office and can not email outside of the office then that's network security issues--work with those network guys to see if the mail will sent out after they open up the port.
0
 

Author Comment

by:Quantster
ID: 21835578
HI 60MXG:

 I can ask the network guys to do that. Heres my dillema, I am going to give this software to a lot of my clients. Therefore I was looking for a solution thats extremely easy for them. That is to say that they can follow just some simple setup steps and be done. If there is no solution like that, I would have to look at opening the ports. But, that solution is certainly not desireable. Please let me know if you have any further information. Thanks a ton for all your help so far.

Thanks
Quantster
0
 
LVL 7

Expert Comment

by:Dauhee
ID: 21837749
you could send email via webserves such as http://www.strikeiron.com/ and others. As long as you have port 80 access you don't even need an email server

It will cost ya though :)
0
 
LVL 7

Accepted Solution

by:
60MXG earned 250 total points
ID: 21849522
In that case, you can have the code written for the mail server on config file.  For an example, I have my Web.config file set up like this.

<appSettings>
    <add key="myMailServer" value="server=exchange.testingdomain.com">
</appSettings>

Then in your application coding you call the "myMailServer" so it will be something like this

SendMail  sendMail  = new SendMail();     --- Predefined the class I wrote already

sendMail.smtpserver = myMailServer;

so when you change different clients all you need to change is the config file.  I hope this help!  
0
 

Author Comment

by:Quantster
ID: 21849763
HI 60MXG:

 My next rollout is a couple of months away, so I will not know until then how well it works. But for now I will go with your solution and close this one out. Thank you you all your help
0
 

Author Closing Comment

by:Quantster
ID: 31469171
Hi,
 Thank you for your help.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now