473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Question about sending email in asp.net web application

I am using Peter Bromberg's code to send email through gmail smtp
service in my asp.net web application. Thanks, Peter.

The problem with gmail smtp is that gmail will overwrite the sender's
address with whichever the gmail smtp server authenticates. In other
words, even if you say

mailMessage.From = new MailAddress("jo*****@somewhere.com");

But, if you authenticate yourself through "ja*****@gmail.com",

Then the sender address will be overwritten as "ja*****@gmail.com".

I understand that this makes perfect anti-spamming sense.

Here is my situation. I have domain mydomain.com, and I am using the
google apps email service with this mydomain.com. So, I have email
addresses like

in**@mydomain.com
fe******@mydomain.com

But, I cannot authenticate neither of these against gmail smtp server,
so I have to use gn********@gmail.com to get authenticated, but then,
recipients will see that my email is from gn********@gmail.com instead
of from in**@mydomain.com. This is very unprofessional, isn't it?

So, here is the question, I don't have a mail server on mydomain.com,
is there a work around to send mail and recipient would see that the
email is from in**@mydomain.com?

Thank you.
Apr 8 '08 #1
6 1352
Would setting up your Email domain through GoogleApps help ?

http://www.google.com/a/help/intl/en/index.html


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"gnewsgroup" <gn********@gmail.comwrote in message
news:8a**********************************@z38g2000 hsc.googlegroups.com...
>I am using Peter Bromberg's code to send email through gmail smtp
service in my asp.net web application. Thanks, Peter.

The problem with gmail smtp is that gmail will overwrite the sender's
address with whichever the gmail smtp server authenticates. In other
words, even if you say

mailMessage.From = new MailAddress("jo*****@somewhere.com");

But, if you authenticate yourself through "ja*****@gmail.com",

Then the sender address will be overwritten as "ja*****@gmail.com".

I understand that this makes perfect anti-spamming sense.

Here is my situation. I have domain mydomain.com, and I am using the
google apps email service with this mydomain.com. So, I have email
addresses like

in**@mydomain.com
fe******@mydomain.com

But, I cannot authenticate neither of these against gmail smtp server,
so I have to use gn********@gmail.com to get authenticated, but then,
recipients will see that my email is from gn********@gmail.com instead
of from in**@mydomain.com. This is very unprofessional, isn't it?

So, here is the question, I don't have a mail server on mydomain.com,
is there a work around to send mail and recipient would see that the
email is from in**@mydomain.com?

Thank you.


Apr 8 '08 #2
I haven't tried using the ReplyTo property to see if that would help, but in
a pinch you could always invite your "selves" to get their own unique gmail
addresses and use the correct one for each.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
"gnewsgroup" wrote:
I am using Peter Bromberg's code to send email through gmail smtp
service in my asp.net web application. Thanks, Peter.

The problem with gmail smtp is that gmail will overwrite the sender's
address with whichever the gmail smtp server authenticates. In other
words, even if you say

mailMessage.From = new MailAddress("jo*****@somewhere.com");

But, if you authenticate yourself through "ja*****@gmail.com",

Then the sender address will be overwritten as "ja*****@gmail.com".

I understand that this makes perfect anti-spamming sense.

Here is my situation. I have domain mydomain.com, and I am using the
google apps email service with this mydomain.com. So, I have email
addresses like

in**@mydomain.com
fe******@mydomain.com

But, I cannot authenticate neither of these against gmail smtp server,
so I have to use gn********@gmail.com to get authenticated, but then,
recipients will see that my email is from gn********@gmail.com instead
of from in**@mydomain.com. This is very unprofessional, isn't it?

So, here is the question, I don't have a mail server on mydomain.com,
is there a work around to send mail and recipient would see that the
email is from in**@mydomain.com?

Thank you.
Apr 8 '08 #3
On Apr 8, 3:21 pm, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
Would setting up your Email domain through GoogleApps help ?

http://www.google.com/a/help/intl/en/index.html

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
======================================
Well, I am already using the gmail apps with my own email domain like
in**@mydomain.com. In other words, I log onto google's apps site and
check my email. Although it is really gmail, but I have my own
domain.

But, I cannot authenticate my custom domain email against gmail smtp.
It seems that one can get authenticated by gmail smtp only if he uses
the explicit gmail (i.e. us******@gmail.com) credentials.
Apr 8 '08 #4
On Apr 8, 3:26 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.comwrote:
I haven't tried using the ReplyTo property to see if that would help, but in
a pinch you could always invite your "selves" to get their own unique gmail
addresses and use the correct one for each.
-- Peter
Site:http://www.eggheadcafe.com
UnBlog:http://petesbloggerama.blogspot.com
Short Urls & more:http://ittyurl.net

Well, I did try the ReplyTo property. It helps in that when the user
hits the Reply button, the ReplyTo email address will automatically
jump to the To: field.

But, still, the recipient can see that this email is from
gn********@gmail.com instead of in**@mydomain.com.
Apr 8 '08 #5
On Apr 8, 3:26 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.comwrote:
I haven't tried using the ReplyTo property to see if that would help, but in
a pinch you could always invite your "selves" to get their own unique gmail
addresses and use the correct one for each.
-- Peter
Site:http://www.eggheadcafe.com
UnBlog:http://petesbloggerama.blogspot.com
Short Urls & more:http://ittyurl.net
OK, the thing is, I would like to let the user see that s/he received
the email from in**@mydomain.com instead of so*****@gmail.com.

How does the SMTP service that comes with IIS work? I tried it a long
time ago, but it was not successful, and had to give it up.
Apr 8 '08 #6
On Apr 8, 4:11 pm, gnewsgroup <gnewsgr...@gmail.comwrote:
On Apr 8, 3:26 pm, Peter Bromberg [C# MVP]

<pbromb...@yahoo.NoSpamMaam.comwrote:
I haven't tried using the ReplyTo property to see if that would help, but in
a pinch you could always invite your "selves" to get their own unique gmail
addresses and use the correct one for each.
-- Peter
Site:http://www.eggheadcafe.com
UnBlog:http://petesbloggerama.blogspot.com
Short Urls & more:http://ittyurl.net

Well, I did try the ReplyTo property. It helps in that when the user
hits the Reply button, the ReplyTo email address will automatically
jump to the To: field.

But, still, the recipient can see that this email is from
gnewsgr...@gmail.com instead of i...@mydomain.com.
Looks like SendMail for Windows can do that. 49 bucks a copy.
Apr 8 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joe | last post by:
Hi, I am sending an email from an asp page. Besides sending an email to sender, I am sending myself a BCC also. Out of 100 emails sent, about 5 recipients received a blank email (no text in...
13
by: Mark | last post by:
Hi This is a fairly generic question about programming style and to a certain extent garbage collection. I have some methods that I write to text logs, the event log etc at various places in...
2
by: Mika M | last post by:
Hi! My application uses Rs232-class, which was shipped with "101 VB.NET Samples\Framework - Using the COM Port". I need to sent certain kind of string into peripheral equipment attached to...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
9
by: Miro | last post by:
VB 2003 at the end of the code, this works great. bytCommand = Encoding.ASCII.GetBytes("testing hello send text") udpClient.Send(bytCommand, bytCommand.Length) and this recieves it Dim...
1
by: xin.yadong | last post by:
Hi: I have a shared function for sending Email using SMTP. It works fine in a ASP.NET web application. But when I use it in a VB.Net Windows application, it always gave me an error: "Could not...
4
by: InnoCreate | last post by:
Hi Everyone, I've added an error handler to some code and as part for the routine it logs to the application log and then sends the administrator an email. For some reason this email isn't...
3
by: H. S. Lahman | last post by:
Responding to siddharthkhare... Ignore Topmind and frebe. They are anti-OO P/R guys. Let's not confuse things with specific 3GL syntax. At the OOA/D level the model looks like: | 1
31
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.