473,513 Members | 2,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mail through gmail smtp server

36 New Member
I tried a lot to send email from my gmail id using the smtp server of gmail.com but I am getting request time out error. I increased the execution time in web.config then also getting the same error.

Please help me.

Thanx n Regards,
Aradhana
Jul 10 '08 #1
8 3310
aradhanathawait
36 New Member
I tried a lot to send email from my gmail id using the smtp server of gmail.com but I am getting request time out error. I increased the execution time in web.config then also getting the same error.

Please help me.

Thanx n Regards,
Aradhana
Jul 10 '08 #2
DrBunchman
979 Recognized Expert Contributor
Can you print the code you are using to send the e-mail please.

Dr B
Jul 10 '08 #3
Plater
7,872 Recognized Expert Expert
gmail is a little different, there are a few things you need to do.
1) Did you enable SMTP in the gmail settings? It's turned off by default
2) Did you follow the authentication instructions provided by gmail?
3) Did you remember that you have to turn on encryption for your smtp to work?

Also, pelase do not double post your questions, it's against the posting guidelines.
MODERATOR
Jul 10 '08 #4
aradhanathawait
36 New Member
Can you print the code you are using to send the e-mail please.

Dr B
Following is the code snippet i am using. Please tell me if some additional configuration is needed:-

Expand|Select|Wrap|Line Numbers
  1.  
  2. System.Net.Mail.MailMessage Mail = new System.Net.Mail.MailMessage("myid@gmail.com", tomail, submail, mesg);
  3.  
  4. Mail.IsBodyHtml = true;
  5. Mail.Body = mesg;
  6. System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential("myid@gmail.com", "mypwd");
  7.  
  8. System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
  9.  
  10. mailClient.EnableSsl = true;
  11.  
  12. mailClient.UseDefaultCredentials = false;
  13.  
  14. mailClient.Credentials = mailAuthentication;
  15.  
  16. mailClient.Send(Mail);
  17.  
Thanx n regards,

Aradhana
Jul 11 '08 #5
aradhanathawait
36 New Member
gmail is a little different, there are a few things you need to do.
1) Did you enable SMTP in the gmail settings? It's turned off by default
2) Did you follow the authentication instructions provided by gmail?
3) Did you remember that you have to turn on encryption for your smtp to work?

Also, pelase do not double post your questions, it's against the posting guidelines.
MODERATOR

Please explain in detail from where to enable the above settings. Thank you very much for the ur advice. I won't repeat this type of mistakes in future.

thanx n regards,
Aradhana
Jul 11 '08 #6
Plater
7,872 Recognized Expert Expert
Your code actually looks fairly correct.
I would guess that the user you are trying to send email as, has not enabled SMTP inside the gmail webpage.
Jul 11 '08 #7
aradhanathawait
36 New Member
Your code actually looks fairly correct.
I would guess that the user you are trying to send email as, has not enabled SMTP inside the gmail webpage.
Please tell me how to do that?

Thanx and Regards,
Aradhana
Jul 15 '08 #8
Plater
7,872 Recognized Expert Expert
Please tell me how to do that?

Thanx and Regards,
Aradhana
Go to Gmail.
Follow their directions under "settings"
Jul 15 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
5545
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us” page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email account. I was using optimum online service with smtp server as “mail.optonline.net”. I can receive email correctly. Now I switch to verizon DSL....
34
18146
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
5
4203
by: Sin Jeong-hun | last post by:
Hi. I would like to let users send bug reports or other messages to me. Maybe the easiest way to send e-mails from my application is just use the default e-mail agent by executing a link mailto://mymail@domail.com. But this only works if the user has configured Outlook or something. Many users use web-based mails here so if I do so,...
7
2760
by: John Drako | last post by:
Currently, I run postfix on my own server to send message from my site (password requests, account activation notices and other messages). I have phpMailer on the server and all the messages (currently about 1000 messages are sent daily) are sent by SMTP through postfix. I'm contemplating moving this particular site's email to Gmail. Is...
5
3102
by: sui | last post by:
this is my code import sys, os, glob, datetime, time import smtplib ## Parameters for SMTP session port=587 SMTPserver= 'smtp.gmail.com' SMTPuser= '...@gmail.com' pw= 'fill in here' SENDER= SMTPuser
0
7178
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7563
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5703
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3252
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.