Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 11th, 2012, 08:41 PM
Authorized User
Points: 224, Level: 4
Points: 224, Level: 4 Points: 224, Level: 4 Points: 224, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 41
Thanks: 3
Thanked 4 Times in 3 Posts
Default Email Question: Chp 9

Hi Imar,

I have a site with some random users. Each user is able to set up a group. I want to set up a page where he can email his group members.

Question: I host my site on Godaddy.com. Can I allow the FROM: field to be the actual email of the user (e.g., he has a @yahoo.com email account)?

I have things set up so that I can send emails from my site to users. But right now, all the emails have admin@site.com as the sender (which is set up as a valid email account on host account), which goes through. Must the Sender always be a valid account on the email service being used?

I guess this makes sense for security (protect vs spamming reasons); otherwise, ppl can send mass emails and make it appear to come from legitimate emails (spoofing), right?

Anyways, I suspect this and wish to confirm. Thus, allowing me to understand what is and isn't allowed with email sending.

Thanks,

- nano
Reply With Quote
  #2 (permalink)  
Old March 12th, 2012, 03:34 AM
Imar's Avatar
Wrox Author
Points: 72,045, Level: 100
Points: 72,045, Level: 100 Points: 72,045, Level: 100 Points: 72,045, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,083
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

It depends. Some outgoing mail servers just accept whatever From address you're using. Others reject the message completely, and yet others overwrite it with the address that belongs to the account. Looks like in your case you fall in the third category. Could be a GoDaddy security setting so if this is important, find another host ;-)

Have you tried setting the From address explicitly in code or in the web.config?

Also, take a look at the ReplyToList property of the MailMessage: http://msdn.microsoft.com/en-us/libr...plytolist.aspx
That way, the From may not be what you want but replying to the message gets you the proper address.

Cheers,

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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chp 16, Sign Up Question nanonerd BOOK: Beginning ASP.NET 4 : in C# and VB 2 November 2nd, 2011 12:55 AM
CHP 9 : Email issue: Smtp server returned an invalid response. Cooler BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 6 February 28th, 2011 01:38 PM
Chp 10: mysql command question DMatt BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 13 October 7th, 2010 03:33 AM
Question about email digink BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 03:39 PM
Email question... iceman90289 ASP.NET 3.5 Basics 9 August 29th, 2009 09:44 AM



All times are GMT -4. The time now is 02:02 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.