Web Forms :: Send Email Without Username And Password With Gmail Account?

May 7, 2015

The below code working fine but I dont want to pass the username and pwd at NetworkCredential. Is there any way to avoid passing username and password ? Is it mandatory that we should pass from username and password in NetworkCredential ?  

SmtpClient _SmtpClient = new SmtpClient("smtp.gmail.com");
MailAddressCollection _MailAddressCollection = new MailAddressCollection();
MailMessage _message = new MailMessage();
_message.From = new MailAddress("abc@gmail.com");

[Code].....

View 1 Replies


Similar Messages:

Web Forms :: Get Username And Password From Gmail Account?

Nov 20, 2013

I want to create a login page in asp .net .... The username  and password are same as my gmail account username and password. When I enter the username and password it go to gmail server and check the username and password are available or not available means redirect a new page 

View 1 Replies

Web Forms :: Not Able To Send Email Using Gmail Account From Web Application

Aug 30, 2012

I am trying hard from the past 2 days to Send mail to my gmail account. But I am not able to do so

Only Exception i am getting is "Failure sending mail."
 
If i am giving wrong username and password then it is giving the exception
 
" The SMTP server requires a secure connection or the client was not authenticated.  The server response was: 5.5.1 Authentication Required. Learn more at"
 
 0
 
 2

View 1 Replies

Web Forms :: Send Email Through Server Instead Of Gmail Credential Account?

Mar 23, 2011

Previously I had thread Send Mail? That helps me to send mail through Gmail credential account. Now I want to send Email through my server (suppose my server name is [URL]) so what should I do?

View 3 Replies

Send Email To Gmail Account

Mar 25, 2014

Having problems sending email to a gmail account? In my web config I have it setup as:

Code:
<system.net>
<mailSettings>
<smtp from="xxxx" deliveryMethod="Network" >
<network host="smtp.xxxx.com" password="xxx" userName="xxx" enableSsl="false" port="25" />
</smtp>
</mailSettings>
</system.net>

This works if I send it to something like my domain, but if I try this to gmail it will give me something like "secure connection required" I've tried a few different ports. I've tried 587 and it gives me the same thing. If I turn enablessl=true ports 587 and 25 will tell me secure email no supported. If I try it on port 465 it will time out.

there's a thing called "Collaboration Data Objects for Windows 2000" using System.Web.Mail, but I don't want to do that because I'm using System.Net.Mail and microsoft also when I try and compile the CDO objects it says it's now unsupported plus it doesn't work anyway. It times out when I try this:

Code:
Dim smtpServer As String = "xxxx"
Dim userName As String = "xxx"
Dim password As String = "xxx"
Dim cdoBasic As Integer = 1

[Code] ....

View 1 Replies

C# - Couldn't Send Email Using Gmail Account

Mar 16, 2011

Can we use gmail account to send email in asp.net website from *localhost * (local machine) ? I am trying but badly unsuccessful. It works fine on hosting but donot work on my machine.

I have windows server 2003 on my machine, I have added port 587 and 465 in firewall in exceptions. In my gmail account I also have enabled POP and IMAP. Some people to use port 465 and others say port 587 should be used. I tried both and below was my result:

Using port 465 it take time and finally give message that the opration has timed out. falure
Using port 587 it dont take time, show message "failuer sending email" with an inner expection "No connection could be made because the target machine actively refused it 72.14.213.109:587"

[code]....

View 3 Replies

Web Forms :: Using System.Net.Mail To Send Email To Gmail Account From Outlook Web Server

Jul 15, 2010

I am trying to send an email from our web server to a gmail account via System.Net.Mail but am failing miserably receiving this error message:

Mailbox name not allowed. The server response was:

that domain isn't in my list of allowed rcpthosts (#5.7.1) Using this code I am able to send emails to other email addresses on our Outlook email server:

[Code]....

So I know I am capable of sending email to Gmail with port 587 and using the proper credentials of my own Gmail account. That is not the problem.


The problem is I want to be able to have the mail sent from my application from whatever the user puts in the FROM (Email address): text box to a Gmail account. When I use the above code, the address that the email is sent from is my own.

So the question is: Is there any way to configure this to be able to send from an Outlook email server to a Gmail account without having to use my Gmail account to actually do it (using my credientials). Therefore showing the email as sent from whatever the user puts in the txtEmail text box, and having it sent from the Outlook server?

I know my SMTP uses the port 25 for outgoing mail and I am pretty sure that the Gmail settings block port 25 for incoming mail, which makes sense, but what doesnt make sense is I can compose a message in Outlook and send it to a gmail account, but I cannot automate this through my programming, which makes me feel certain its my programming.

View 3 Replies

C# - Send Email From Local Host Using Gmail Account?

Jan 15, 2011

Can we send email form local host using gmail smtp? I am trying and getting error The operation has timed out. I am trying to send email from local host from last 3 days. It works fine if I send emails from my hosting server using gmail but it is not working on localhost. I have disabled firewall anti virus but even then unlucky. have u ever used gmail for sending emails from localhost (without any server involved) If it is possible.

protected void btnConfirm_Click(object sender, EventArgs e)
{
MailMessage message = new MailMessage();
message.To.Add("me@hotmail.com");
message.From = new MailAddress("xxxxxx@gmail.com");
message.Subject = "New test mail";
message.Body = "Hello test message succeed";
message.IsBodyHtml = true;
message.BodyEncoding = System.Text.Encoding.ASCII;
message.Priority = System.Net.Mail.MailPriority.High;
SmtpClient smtp = new SmtpClient();
smtp.EnableSsl = true;
smtp.Port = 465;
smtp.UseDefaultCredentials = false;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new NetworkCredential("xxxxxx@gmail.com", "**mypassword**");
try
{
smtp.Send(message);
}
catch (Exception ex)
{
throw ex;
}
}

View 3 Replies

Web Forms :: Send Email Through Gmail Account - SMTP Server Requires A Secure Connection

Jan 12, 2011

i'm trying to send email through gmail account

i get this error:

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at

web config is like below:

[Code]....

and my code :

[Code]....

View 4 Replies

Web Forms :: Send Email With Username And Password When User Forget Password

Sep 15, 2012

URL...how we can sending formatted email now in my Login.aspx page i have Textbox that when users forget their password they should type their Username on the textbox and after that click on send button.I want when users click on send button their user name that they type in textbox be on the email that send to me .

View 1 Replies

Email Was Not Sending To Gmail Account

Apr 21, 2010

while send email from asp.net code, When i am sending mail to other than gmail then its work fine , but when i try to send an email to gmail account its not working Send To : info@[URL] is my gmail account email address When i send email to info@[URL] its not working when i use another email Like Send To: awakeel@[URL] its work fine and i recieve the email

View 5 Replies

C# - Sending Email Using Gmail Account On Local Machine

Jan 14, 2011

I am using gmail for sending email in my asp.net application. Email works fine if I send email on server but if I try to send emails on local machine it give error. I placed break poin in code and when send method is called it shows error box with heading "Smtp exception was unhandled by user code" and in detail it says "Faliur sending mail". If I continued on browser it shows error page with these details:

An existing connection was forcibly closed by the remote host Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

protected void btnConfirm_Click(object sender, EventArgs e)
{
string _Message = GetAdminEmailMessage();
MailMessage message = new MailMessage();
SmtpClient smtp = new SmtpClient();
NetworkCredential mailAuthentication = new NetworkCredential("myaccount@gmail.com", "mypassword");
message.To.Add(new MailAddress("mc5678@hotmail.com"));
message.From = new MailAddress("myaccount@gmail.com");
message.IsBodyHtml = true;
message.Subject = "Local test email";
message.Body = _Message;
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
smtp.Port = 587;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Host = "smtp.gmail.com";
smtp.Credentials = mailAuthentication;
smtp.Send(message);
}

View 1 Replies

Web Forms :: Decrypt Encrypted Password In Database And Send Forgot Password Email

May 7, 2015

I am using the below post to encrypt and decrypt the password.

ENCRYPT POST

Now my code is working for Encryption. But now what I want is,

When I am using Forgot passwprd functionality, I want to send the decrypted password to the respective user in the Email.

In my database table the password is saved in the Encrypted format.

I have the code decrypt code from the above mentioned post, the question is where to place in the below code so that it will decrypt it properly

Here is my code:-

protected void btnSubmit_Click(object sender, EventArgs e) {
DataSet ds = new DataSet();
using (SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DefaultCSRConnection"].ConnectionString)) {
conn.Open();

[Code] ....

View 1 Replies

Web Forms :: Send Forgot Password Email To Multiple Domain Email Addresses Using Single Program

Mar 31, 2013

i have code for forgot password using gmail account. But i want to send password for multiple domains like yahoo,rediffmail and more.

View 1 Replies

Web Forms :: Send Details To Own Email Account?

Feb 13, 2014

i have name ,address,contactno,emailid,details of enquiry labels and their respective textbox and one submit button.i just want to send all the information to my emailid(msenterprises@mseworld.in) whenever a user click on submit button..

View 1 Replies

Can Send Email Using Gmail On Local Machine

Dec 27, 2010

I am using gmail in my asp.net site to send email. It is working fine on shared server but it donot send email when I run my site on local machine in visual studio. Please guide what should I do to make it sending emails from local machine as well.below is my code:

dt = systemrep.GetSystemInfo();
dr = dt.Rows[0];
From = dr["nm_EmailFrom"].ToString();
SMTP = dr["nm_SMTP"].ToString();
Port = dr["amt_Port"].ToString();
EmailId = dr["nm_emailUserId"].ToString();
[code]...

View 2 Replies

Web Forms :: Send Account Activation Link In Email

Jan 23, 2014

How to send a registration link in email upon new event creation? there has to be some ID associated with it so that when a new user clicks on registration link a page opens up with the specific event details..

View 1 Replies

How To Send Email From An App Using Free GMAIL SMTP Server

Mar 15, 2010

I have configured gmail's free smtp server for my web app and previously I was using smtp server configured at the server.

So I have changed my smtp settings accordingly but my app isn't sending any email and giving me error connection time out, third party tool isn't responding after many retrials.

Here are my settings-

SmtpClient smtpClient = new SmtpClient("mail.MyWebsiteDomainName.com", 25);
smtpClient.Credentials = new System.Net.NetworkCredential("info@MyWebsiteDomainName.com", "myIDPassword");
smtpClient.UseDefaultCredentials = true;....

View 8 Replies

Web Forms :: Possible To Allow Users To Login With Email UserName Phone Or Password

Feb 25, 2016

 Is it possible to allow users to login with Email, UserName, Phone  or Password. but landing page should only select record by UserNme

 LOGIN

protected void OnAuthenticate(object sender, AuthenticateEventArgs e) {
string constr = ConfigurationManager.ConnectionStrings["con"].ConnectionString;
int UserID;
using (SqlConnection con = new SqlConnection(constr)) {
using (SqlCommand cmd = new SqlCommand("Validat_UserTable"))

[Code] ....

View 1 Replies

Fails To Send Email Through Gmail SMTP, But From Outlook 2007 Succeeds?

Dec 12, 2010

a couple weeks ago, my ASP.NET website stopped sending user comments which I implemented by emailing those comments to my email account through Gmail SMTP server [URL]. I opened the project on my development machine and again it fails to send the email after a couple minutes with the following exception message:

Failure sending mail

Unable to read data from the transport connection: net_io_connectionclosed.

I'm using Gmail's SMTP with port 465, and MailClient.EnableSSL = True.

The weird thing is my Office Outlook 2007 is using the same settings and it doesn't have any problems sending mail using the same Gmail account.

View 3 Replies

Send Username And Password To Net Web Service

Dec 21, 2010

I am developing a .net application using Web Services, and the application is consuming them using Spring.Net WebServiceProxyFactory. I need to send to the web service the username and password of the user that is logged in to the application, consuming the web service. Reading some forum post [URL] they seem to refer to an example that used to be in the spring documentation [URL], an example of how using SOAP headers for authentication using the WebServiceExporter and WebServiceProxyFactory, but the link to the file is broken. Do you know a way that I can send the user credentials as a soap header using spring.net? Or any data (for example, a token ID that the web service will use later to get the user credentials).

View 1 Replies

Way To Send Email To User Who Is Creating New Account

Nov 14, 2010

to send email to user who is creating new account. i am using following code but it is not working well for me.

[Code]....

View 1 Replies

Security :: Sending More Than One Email With Username And Link In One And Then The Password In Another?

Feb 22, 2010

I was curious how some of you are sending out an email to a new user, are you sending more then one email with username and link in one and then the password in another, are you sending everything in one email, are you sending an email to the new user at all?I'm curious because my web site is not a self registering web site, Only a supervisor can create a new user and then that user gets an email. I'm trying to figure out the best way to send the new user an email with their credentials to the site.the users are outside users (vendors) though their username is created by an internal employee

View 10 Replies

Web Forms :: Send Email When Users Forget Their Password

Sep 12, 2012

I have login page and i have 2 text box and 2 button

1-btnlogin
2-btnforget

When users forget their password they click on btnforget and they go to pass.aspx page in this page they enter their email address and click on send button ...

I want when users click on send button automatically send me an email with their username and email address that they type in textbox ...

View 1 Replies

Configuration :: Configuring IIS To Send Email Via Home Adsl Account?

Sep 24, 2010

Working from home on an XP Machine, trying to configure IIS to send emails from Asp.Net via my broadband provider (BT).

Relay 127.0.0.1 enabled, so now errors are:The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.3 Client was not authenticated

Pertinent settings that I can see are (in IIS Default SMTP Virtual Server properties):

Access, Authentication (presumably app to IIS): Basic + Integrated Windows

(However Basic includes correct BT server smtp.btconnect.com -> suggests this is authentication relevant IIS to BT, not app to IIS)

Access, Relay: 127.0.0.1 added

Delivery, Outbound Security: (presumably IIS to BT) Basic Authentication

UserName: my.btusername@btconnect.com (tried with and without @domain)

Password: ***** per my account at Bt

Integrated Windows Authentication disabled

TLS Encryption NOT selected

---

I cannot see any other obvious candidates for authentication.

I presume model is Asp.Net App -> IIS (step 1) and IIS -> BT (step 2)

I presume Access, Authentication specifies step 1, and Delivery, Outbound Security handles step 2 - though why then does IIS recognise my bt server in step 1?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved