Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

SMTP hostname on my webserver for asp.net page

Posted on 2009-05-04
7
682 Views
Last Modified: 2012-06-21
Hi,

I am trying to create  this asp.net web page which sends out email.
I need the smtp hostname of my webserver but my web server folks are not so helpful. Either they don't know where to find that name or don't know if that's been configured on the web server.

How can I look for this smtp hostname so I can write it in SmtpMail class in asp.net?

If I can't find it, I just do it in html.
I used Server.CreateObject('CDONTS.NewMail') object to email.
Why is it so hard for me to find this smtp hostname??
Is there a way I can guess it if know the domain name, say, something.com?
Thanks.
0
Comment
Question by:dkim18
  • 3
  • 2
  • 2
7 Comments
 
LVL 39

Accepted Solution

by:
abel earned 270 total points
ID: 24298184
That's unfortunately not so trivial. Either you have access to the MX records of your DNS configuration and you can just look it up, or you do not, and you can only find it by trial and error.

You can try a telnet session to the SMTP port (25) using some of the more commonly used names, like smtp.example.com, mail.example.com, sendmail.example.com. If it is non of them, you are a bit out of luck.

Normally, when your hosting provider sets up your account they send you the information, including the SMTP information. It may also be that they did not set it up correctly for you or that they did not include a SMTP service. In which case you can always resort to the default outgoing mail server of your hosting provider, the same one that is configured in your Outlook / Thunderbird / Pegasus mail client.

You seem to use ASP.NET. In the case, you do not need CreateObject. You can just use the System.Net.Mail.* objects and classes directly.
0
 
LVL 15

Assisted Solution

by:oobayly
oobayly earned 230 total points
ID: 24298308
What do you mean by "do it in html"?
Determining the smtp server name is only going to be possible by speaking to your hosting providers (or server admin). There's no standard name for them, for example 1 & 1 hosting have auth.smtp.1and1.co.uk, but on Port 587 rather than 25. It sounds like shear laziness on their behalf.

Though, if using CDONTS without specifying a hostname, it sounds like it's using the local IIS SMTP Server. To be honest it's been a very long time since I've used CDONTS.
0
 

Author Comment

by:dkim18
ID: 24298560
I am at the client site and the web server folks don't reply to my request. My client and I have no control over them unfortunately.
I guess I just have to do with the CDONTS class.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 15

Expert Comment

by:oobayly
ID: 24298658
When you say client side, you mean that you're using the web browser to send the email?
0
 
LVL 39

Expert Comment

by:abel
ID: 24298856
> I guess I just have to do with the CDONTS class.

I don't understand. The way you are coding this, has nothing to do with the name of the server. You will have to configure that anyway. You say "you just do it in html", but it is impossible to send email by using html, what do you mean by that (this is a repetition of the question of oobayly, it is important to follow-up, so we can help you in the right direction).

What is the url of the website that you think also has an SMTP server behind it somehow?
0
 

Author Comment

by:dkim18
ID: 24308088
Thanks guys.

 Sorry for the confusion.
I said that because I don't remember putting any smtp information when I used the CDONTS.
It is running on the same webserver.


Anyway, I found another web developer who had the smtp sever name.
Thanks.
0
 
LVL 39

Expert Comment

by:abel
ID: 24309045
glad you found it and got it working! Tx ;)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Client Validating 2 date fields, required & comparison 1 42
C# MVC Insert Multiple Row into DB 2 30
ASP.NET Content Page 3 25
Easy filter aspnet 2 24
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

791 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