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
8 3310
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
Can you print the code you are using to send the e-mail please.
Dr B
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
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:- -
-
System.Net.Mail.MailMessage Mail = new System.Net.Mail.MailMessage("myid@gmail.com", tomail, submail, mesg);
-
-
Mail.IsBodyHtml = true;
-
Mail.Body = mesg;
-
System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential("myid@gmail.com", "mypwd");
-
-
System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
-
-
mailClient.EnableSsl = true;
-
-
mailClient.UseDefaultCredentials = false;
-
-
mailClient.Credentials = mailAuthentication;
-
-
mailClient.Send(Mail);
-
Thanx n regards,
Aradhana
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
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.
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
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"
Sign in to post your reply or Sign up for a free account.
Similar topics |
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....
|
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,
|
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,...
|
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...
|
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
| |
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...
|
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. ...
|
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...
|
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...
|
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...
|
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...
| |
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |