Question about sending email in asp.net web application

Discussion in 'ASP .Net' started by gnewsgroup, Apr 8, 2008.

  1. gnewsgroup

    gnewsgroup Guest

    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("");

    But, if you authenticate yourself through "",

    Then the sender address will be overwritten as "".

    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




    But, I cannot authenticate neither of these against gmail smtp server,
    so I have to use to get authenticated, but then,
    recipients will see that my email is from instead
    of from . 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 ?

    Thank you.
     
    gnewsgroup, Apr 8, 2008
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    >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("");
    >
    > But, if you authenticate yourself through "",
    >
    > Then the sender address will be overwritten as "".
    >
    > 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
    >
    >
    >
    >
    > But, I cannot authenticate neither of these against gmail smtp server,
    > so I have to use to get authenticated, but then,
    > recipients will see that my email is from instead
    > of from . 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 ?
    >
    > Thank you.
    >
    >
     
    Juan T. Llibre, Apr 8, 2008
    #2
    1. Advertising

  3. 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("");
    >
    > But, if you authenticate yourself through "",
    >
    > Then the sender address will be overwritten as "".
    >
    > 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
    >
    >
    >
    >
    > But, I cannot authenticate neither of these against gmail smtp server,
    > so I have to use to get authenticated, but then,
    > recipients will see that my email is from instead
    > of from . 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 ?
    >
    > Thank you.
    >
    >
    >
     
    Peter Bromberg [C# MVP], Apr 8, 2008
    #3
  4. gnewsgroup

    gnewsgroup Guest

    On Apr 8, 3:21 pm, "Juan T. Llibre" <> wrote:
    > 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 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. ) credentials.
     
    gnewsgroup, Apr 8, 2008
    #4
  5. gnewsgroup

    gnewsgroup Guest

    On Apr 8, 3:26 pm, Peter Bromberg [C# MVP]
    <> wrote:
    > 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
    instead of .
     
    gnewsgroup, Apr 8, 2008
    #5
  6. gnewsgroup

    gnewsgroup Guest

    On Apr 8, 3:26 pm, Peter Bromberg [C# MVP]
    <> wrote:
    > 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 instead of .

    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.
     
    gnewsgroup, Apr 8, 2008
    #6
  7. gnewsgroup

    gnewsgroup Guest

    On Apr 8, 4:11 pm, gnewsgroup <> wrote:
    > On Apr 8, 3:26 pm, Peter Bromberg [C# MVP]
    >
    > <> wrote:
    > > 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
    > instead of .


    Looks like SendMail for Windows can do that. 49 bucks a copy.
     
    gnewsgroup, Apr 8, 2008
    #7
  8. Hello
    i am using google applications and host my domain email with Gmail .
    I have a user name called support and i am able to authenticate and
    send email .
    Can you post your code including user name also ? Do not forget to
    remove the password

    http://www.codeexplore.com/
    Make money writing articles

    On Apr 8, 10:09 pm, gnewsgroup <> wrote:
    > On Apr 8, 3:21 pm, "Juan T. Llibre" <> wrote:
    >
    > > Would setting up your Email domain through GoogleApps help ?

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

    >
    > > Juan T. Llibre,asp.netMVP
    > >asp.netfaq :http://asp.net.do/faq/
    > > foros deasp.net, en español :http://asp.net.do/foros/
    > > ======================================

    >
    > Well, I am already using the gmail apps with my own email domain like
    > . 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. ) credentials.
     
    DownlodComponent, Apr 9, 2008
    #8
  9. gnewsgroup

    gnewsgroup Guest

    On Apr 9, 10:23 am, DownlodComponent <> wrote:
    > Hello
    > i am using google applications and host my domain email with Gmail .
    > I have a user name called support and i am able to authenticate and
    > send email .
    > Can you post your code including user name also ? Do not forget to
    > remove the password
    >
    > http://www.codeexplore.com/
    > Make money writing articles
    >



    Hey, that sounds exciting to me. Please take a look at the code I use
    at the following link. I think it's nicer to for eye to put it on a
    webpage instead of here at this newsgroup.

    http://gnewsgroup.googlepages.com/sendemailviagmailsmtp

    That's the code that works. I haven't been able to succeed with my
    custom domain email through smtp.gmail.com. Please do share how you
    had it work. Thanks a lot!
     
    gnewsgroup, Apr 9, 2008
    #9
  10. gnewsgroup

    gnewsgroup Guest

    On Apr 9, 10:23 am, DownlodComponent <> wrote:
    > Hello
    > i am using google applications and host my domain email with Gmail .
    > I have a user name called support and i am able to authenticate and
    > send email .
    > Can you post your code including user name also ? Do not forget to
    > remove the password
    >
    > http://www.codeexplore.com/
    > Make money writing articles
    >


    One thing I need to add is that I am only use the free google apps, I
    am not paying anything. Don't know if this makes a difference.
     
    gnewsgroup, Apr 9, 2008
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. levon
    Replies:
    1
    Views:
    491
    Patrick Olurotimi Ige
    Jun 12, 2005
  2. Luke
    Replies:
    2
    Views:
    4,755
    Nigel Wade
    Mar 15, 2007
  3. Santosh
    Replies:
    7
    Views:
    393
    Santosh
    Mar 26, 2007
  4. MOHSEN KASHANI

    Sending email through asp.net web app

    MOHSEN KASHANI, Dec 13, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    374
  5. rote
    Replies:
    8
    Views:
    788
Loading...

Share This Page