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 3316
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. I change my smtp server accordingly as
|
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, Outlook Express's a
new account wizard will pop-up. Futhure more this reveals user e-mails.
Some people...
|
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 it possible to send mail through Gmail's servers with authentication
and everything?
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |