Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SMTP hostname on my webserver for asp.net page

Posted on 2009-05-04
7
Medium Priority
?
707 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
[X]
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
  • 3
  • 2
  • 2
7 Comments
 
LVL 39

Accepted Solution

by:
abel earned 1080 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 920 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

618 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