Click here to Skip to main content
15,905,785 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What should be the server so that I can send email using gmail.

VB
@FROM           = N'joe@domain.com',
    @FROM_NAME      = N'Joe Mailman',
    @TO             = N'joe@domain.com',
    @replyto        = N'joe@domain.com',
    @CC             = N'',
    @BCC            = N'',
    @priority       = N'NORMAL',
    @subject        = N'Hello SQL Server SMTP Mail',
    @message        = N'Goodbye MAPI and Outlook',
    @messagefile    = N'',
    @type           = N'text/plain',
    @attachment     = N'',
    @attachments    = N'',
    @codepage       = 0,
    @server         = N'mail.domain.com' --> ???
Posted

Should not you expect Google knows more about Google than CodeProject?

—SA
 
Share this answer
 
Comments
this_is_my_alias 28-Apr-11 8:08am    
Yes...but should I sign up on google-specific forums when I have only one question? :(
Sergey Alexandrovich Kryukov 28-Apr-11 12:04pm    
No. It hardly could be original question :-)
The information already published by Google on this topic is surely more than enough.
--SA
The server is smtp.gmail.com. You'll need to look at google to find out what port and any other details you'll need to make it work.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 27-Apr-11 19:22pm    
Thank you for proving my point; you asked Google, I see. My 5.
--SA
this_is_my_alias 28-Apr-11 8:19am    
@SAKryukov --> I already did googled. I actually found smtp.gmail.com. But I was not able to send the mail when in fact it worked in a private domain, so I asked here. And by the way, you should give me at least a simple solution and not a question. Don't you think? You just don't do that as if you own codeproject. I am sorry but sounds like negative to me. You can skip and choose not to answer my question.
Sergey Alexandrovich Kryukov 28-Apr-11 12:11pm    
No, I don't think I should. I also decide by myself what to skip. I'm sorry that you consider my answer offensive and I think you should not. I expressed my respect to you by assuming that just a hint would be enough for you. If you take my advice positively and not negatively you would get the answer yourself. I also know how CodeProject usually works so I realistically expected that some of other expert would follow me and add more detail. This is exactly what happened.

After all, you received the solutions as I expected.
It may look surprising to you, but I still insist you get my hint and use it as a practical advice. I would also advice you to be more positive and feel such thing as humor (in case you missed it).

Best wishes,
--SA
this_is_my_alias 28-Apr-11 8:22am    
@Marc A. Brown --> I already tried it. And using xp_smtp_sendmail, you just fill out those info above. No ports to configure (you use it with MS SQL Server and some sort of automatic config for the port happens -- I don't remember configuring port when I used a private mail domain). Thanks for the answer. I'll try further research.
Marc A. Brown 28-Apr-11 9:32am    
GMail (I believe) requires a secure connection, so it doesn't use the "regular" port.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 27-Apr-11 19:22pm    
Sure, a 5.
--SA
Sandeep Mewara 28-Apr-11 0:28am    
Thanks SA.
I just like to share an alternative that I found months ago... got a little busy so I haven't posted it here after I found a way.

I was asking for GMAIL's mail domain since I want to test an auto-email. Since smtp.gmail.com doesn't work with my set-up, I did the following:


1.) I tried Feebooti Email, gmail works fine. I can send email, but the con is it's a command line tool. I had problems integrating it with my web app.

2.) I installed Mercury for Win32 (open source), so it's like turning your machine as an email server.

I did find the solution using number 2. Basically, the purpose was to simulate an auto-email.

That's all.

Hope this will help others too. :D
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900