Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 1st, 2011, 01:00 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You may want to take a look at this article to see an example of the configuration settings in web.cofig for connecting to Gmail: http://imar.spaanjaars.com/505/using...at-require-ssl

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 1st, 2011, 07:09 PM
Registered User
 
Join Date: Aug 2011
Posts: 13
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by BGrun08 View Post
If I have a gmail account and and internet connection i can use that as an SMTP server?
Yes, very probably. If you have e-mail set up and working with a program like Outlook or Thunderbird, then you can get all the settings you need by looking at how that program is set up. In fact, that's the sensible thing to do: set up your mail program so it can send mail, then copy the settings to your web application.
Quote:
I am unfamiliar with networking completely, I for some reason was under the impression I had to use the e-mail from my ISP in order to have a server, or I had to set up something special with google for it to work.
Stricty speaking, what you need is access to a SMTP server that allows you to send mail. And here the word "server" actually means a piece of software. You can install a SMTP server on your PC and use that if you like--in fact, prior to version 7, Microsoft IIS used to be supplied with a built-in SMTP server that your web applications could use to send mail.

But it's probably going to be a lot easier to use your ISP's SMTP server: it's already set up, you know it works, and you have access to it. You don't have to use your ISP's SMTP server, but any SMTP server you choose to use must tick all the same boxes: it must be set up, it must work, and you must have access to it.
Quote:
Is there not any issues with setting up a port number for the receiving e-mail address or anything like that?
No. Your web application might well need to send e-mail, but it's really hard to think of any reason it would want to receive e-mail. So you only need to look at outbound (SMTP) settings; you needn't bother with inbound (POP3 or IMAP) settings.

To clarify just a little: sending mail is one activity; receiving mail is another completely separate activity. Of course, your e-mail program needs to do both, and it makes them look like a single seamless thing. But in reality they're two separate activities, and your web application is only interested in one of them--i.e. sending.
Quote:
Also, through another forum I was looking at, on a topic only somewhat similar, I saw something mentioned about the receiving e-mail server possibly recognizing SMTP as spam and not allowing the message through? Any truth to anything like that?
Yes, it's true but only under certain circumstances. Some mail systems (for example, the servers run by AOL) check that mail is being sent from the "correct" mail server and reject it if it isn't. For example, if you send an e-mail with the "From" address set to [email protected], the receiving server can make a DNS call to find out what IP address mail sent from widgets.com should officially be coming from, and if the IP address that the mail is actually coming from doesn't match the IP address it should be coming from, the receiving server assumes that the message is spam and rejects it. That's because an enormous amount of spam comes from SMTP servers whose IP addresses don't match the domains the mail is supposedly coming from.

This is likely to affect you if you install a SMTP server on your PC and use it to send mail. It won't happen if you send mail through your ISP's SMTP server using your own e-mail address.
Quote:
I know I can move on without completing this, but I just don't like leaving lose ends.
Well, I hope this has helped!
The Following User Says Thank You to mmmason For This Useful Post:
BGrun08 (September 2nd, 2011)
 
Old September 2nd, 2011, 07:03 AM
Authorized User
 
Join Date: Apr 2011
Posts: 11
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Yeah, first thing I did was to set up Windows Live mail with at&t account before I even attempted this. I truly think I have it all set up correctly at the end, but something is making me message sending time out. Originally I just think I had the wrong smtp server address. Anyways, the specified pickup directory method worked first attempt, so I am just sticking with that for now and moving on. I'll come back to this later. Thanks.
 
Old September 3rd, 2011, 09:42 AM
Friend of Wrox
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

Sometimes some ports are blocked . Make sure the ports that you using is free in your ISP.
 
Old September 3rd, 2011, 08:19 PM
Authorized User
 
Join Date: Apr 2011
Posts: 11
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by morteza View Post
Sometimes some ports are blocked . Make sure the ports that you using is free in your ISP.
How do I do that? Do I have to call my ISP and check, or can I change that somewhere? Don't know a lot about this (obviously). Thanks
 
Old September 4th, 2011, 12:57 AM
Friend of Wrox
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

I use google smtp server and its work's fine.
 
Old September 4th, 2011, 05:49 AM
Registered User
 
Join Date: Aug 2011
Posts: 13
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by BGrun08 View Post
How do I do that? Do I have to call my ISP and check, or can I change that somewhere? Don't know a lot about this (obviously). Thanks
If your ISP blocks ports, they will probably block incoming traffic rather than outgoing traffic. For example, the ISP might allow outgoing HTTP traffic on port 80 but block incoming traffic: this allows you to browse the web but prevents you from running a web server on your PC (well, you can run a web server but nobody will be able to reach it).

If they block outgoing ports, it's most likely the ones related to SMTP traffic. The ISP does this to protect itself from customers that get infected with the kind of malware that is used to send spam.

To answer your questions: no, you can't unblock the blocked ports yourself, and the ISP won't unblock them at your request--there will be something in your T&Cs to this effect. Checking for blocked outgoing ports can be done using a telnet client to contact a remote server and see if you get a response. However, since you've got your Windows Live email client to work with the mail servers that you're interested in using, we already know that traffic to those servers is getting through, so further testing would be a bit redundant.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Struggling with Ch 9 sending e-mail tjsully BOOK: Beginning ASP.NET 4 : in C# and VB 7 July 23rd, 2011 06:30 PM
Accessing e.Message of Sending mail event hirenmehta BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 8 November 30th, 2009 04:27 PM
Sending mail problem!!!! NitinJoshi General .NET 2 January 13th, 2005 08:31 AM
Problem with sending mail nikunjn VS.NET 2002/2003 1 January 29th, 2004 08:29 AM
Problem on sending message hossaini JSP Basics 1 June 23rd, 2003 01:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.