.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Fauzul Azmi
Asad Ali
Post New Web Links

I cannot send mail using gmail smtp server

Posted By:      Posted Date: August 23, 2010    Points: 0   Category :ASP.Net
 

 Here is my code

Dim message As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
        message.To.Add("from textbox field")
        message.Subject = "Testing"
        message.From = New System.Net.Mail.MailAddress("sender email ")
        message.Body = "Just Testing"

        Dim smtp As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient()

        Dim client As SmtpClient = New SmtpClient()
        smtp.Credentials = New System.Net.NetworkCredential("username", "password")
        smtp.Port = 25
        smtp.Host = "smtp.gmail.com"
        smtp.EnableSsl = True
        smtp.DeliveryMethod = SmtpDeliveryMethod.Network
        lblmsg.Text = "Your Email has send"

        Try
        &


View Complete Post


More Related Resource Links

How to configure Gmail SMTP server to send mail

  

Hello,

I'm using forgot password wizard and I configure my smtp like this:

and the SMTP server:

smtp.gmail.com (use authentication)
Use Authentication: Yes
Use STARTTLS: Yes (some clients call this SSL)
Port: 465 or 587

<system.net>
  <mailSettings>
   <smtp from="myemail@gmail.com">
    <network host="smtp.gmail.com" password="pass" port="587"
     userName=myemail@gmail.com />
   </smtp>
  </mailSettings>
 </system.net>


 but, the error:

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. 23sm5887003pzk.8

Please gives me some advices,

Thank you.


send email using Godaddy server by gmail

  

 Hello ,

 

My site is hosted  in Godaddy server. And i am using google apps for emailing a/c for that i have changed the  MX-records and then it is working fine.

Then i finished my web site

http://www.placewellsolutions.com/Default.aspx

it is working fine there .

in the site there is a  contactus link which opens

http://www.placewellsolutions.com/ContactUs.aspx

this page basically should send a mail to a particular email id .

for sending mail I am using gmail a/c . (Here is the full code)

 

public void SendEmail(string From,string GmailEmail, string GmailPassword, string To, string Subject, string Body,      
        FileUpload fileupload)
    {       

        System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
        mail.To.Add(To);
        mail.From = new MailAddress(From, "One Ghost", System.Text.Encoding.UTF8);
        mail.Subject = Subject;
        mail.SubjectEncoding = System.Text.Encoding.UTF8;
  &n

Using Gmail as SMTP Server for SSRS

  
Folks, check the internet, so far not getting to far on using smtp.gmail.com as smtp server. I want  to sent Subscription email using gmail smtp server, but keep getting Failure sending mail: The transport failed to connect to the server. What can I do ? Setup--- SSRS 2008 R2 Windows Server 2008 R2

Using Google SMTP server (smtp.gmail.com) when configuring subscriptions unders SSRS 2008

  
Hello All, I have read thru numerous posts and have reviewed several links with no luck.  I am trying to use gmail smtp servers (smtp.gmail.com) to configure SSRS 2008 to send email.  It's running on Server 2003 Standard SP2. No Exchange server, we use gmail. Error message I receive is "Failure sending mail: The report server has encountered a configuration error. Mail will not be resent." Here is a copy of my RS Email Config: <Configuration> <RSEmailDPConfiguration> <SMTPServer>smtp.gmail.com</SMTPServer> <SMTPServerPort></SMTPServerPort> <SMTPAccountName></SMTPAccountName> <SMTPConnectionTimeout> </SMTPConnectionTimeout> <SMTPServerPickupDirectory> </SMTPServerPickupDirectory> <SMTPUseSSL></SMTPUseSSL> <SendUsing>2</SendUsing> <SMTPAuthenticate></SMTPAuthenticate> <From>myemailaddress@gmail.com</From> <EmbeddedRenderFormats> <RenderingExtension>MHTML</RenderingExtension> </EmbeddedRenderFormats> <PrivilegedUserRenderFormats> </PrivilegedUserRenderFormats> <ExcludedRenderFormats> <RenderingExtension>HTMLOWC</RenderingExtension> <RenderingExtension>NULL</RenderingExtension> <RenderingExtension>RGDI</RenderingExtension> </ExcludedRenderFormats> <SendEmai

Using Google SMTP server (smtp.gmail.com) when configuring subscriptions unders SSRS 2008

  
Hello All, I have read thru numerous posts and have reviewed several links with no luck.  I am trying to use gmail smtp servers (smtp.gmail.com) to configure SSRS 2008 to send email.  It's running on Server 2003 Standard SP2. No Exchange server, we use gmail. Error message I receive is "Failure sending mail: The report server has encountered a configuration error. Mail will not be resent." Here is a copy of my RS Email Config: <Configuration> <RSEmailDPConfiguration> <SMTPServer>smtp.gmail.com</SMTPServer> <SMTPServerPort></SMTPServerPort> <SMTPAccountName></SMTPAccountName> <SMTPConnectionTimeout> </SMTPConnectionTimeout> <SMTPServerPickupDirectory> </SMTPServerPickupDirectory> <SMTPUseSSL></SMTPUseSSL> <SendUsing>2</SendUsing> <SMTPAuthenticate></SMTPAuthenticate> <From>myemailaddress@gmail.com</From> <EmbeddedRenderFormats> <RenderingExtension>MHTML</RenderingExtension> </EmbeddedRenderFormats> <PrivilegedUserRenderFormats> </PrivilegedUserRenderFormats> <ExcludedRenderFormats> <RenderingExtension>HTMLOWC</RenderingExtension> <RenderingExtension>NULL</RenderingExtension> <RenderingExtension>RGDI</RenderingExtension> </ExcludedRenderFormats> <SendEmai

how send mail with out help of sp_send_dbmail in sql server 2005

  
Hi all, I want to sent mail using sp_send_dbmail but the hosing have problem as it require admin permission on master db so  they told me not use this SP is there any other method so that i can send the mail using SQL Server 2005  Thanks and Regards Er.Pradipta Nayak

sening mail using asp.net smtp server

  

Hi i am using  code for sending email

i have uploaded my code to web server. It gives me error

(No connection could be made because the target machine actively refused it XX.XXX.XXX.XXX:XXXX )

 i am using this code for smtp configure http://www.codeproject.com/KB/vb/Email_and_SMS_.aspx?msg=3265289

 


Write a mail : problem in SMTP server ?

  

Hai to all,

I want to sent and receive a mail to any maild id(based on user mind), now every time I need to give smtp server name of the sender mail in my code, but lot of smtp servers

available for different mail providers (we never assume what the mail user will give in to sender area), i have  a separate server with smtp and pop3 enabled,  I don't know how

to use this server for mail purpose.

If i use this server then will my problem is solved then how to use that server or any other solution ?

 

Members have any idea ?

 


2010 E-Mail Alerts with External SMTP Mail Server

  

I'm using SharePoint Server 2010 internally for testing purposes/development purposes.  I don't have Exchange Server or any other SMTP mail server setup.

I have a hosted SMTP mail server.

Can I connect SharePoint Server 2010 to an externally hosted SMTP mail server for e-mail notification testing?

In this case, my hosted SMTP server requires authentication... so I'm not sure SharePoint Server 2010 will be able to connect.

Any ideas?

 

Thanks!


Send smtp mail from asp.net 3.5

  

Hi, i m new to this forum and to asp.net

I m trying to send email from my asp.net page using smtpclient. I m getting an error saying "Error creating object reference:could not create instance of an object.".  When i debug, it throws the error at smtpclient.send method.

Here is my code:

 try

{

MailAddress toAddress = new MailAddress("maran@makefriendsonline.com");

MailAddress fromAddress = new MailAddress(txtEmail.Text.Trim());

MailMessage msg = new MailMessage();

msg.To.Add(toAddress);

msg.From = fromAddress;

msg.Subject = "New Customer Enquiry";

 msg.IsBodyHtml = true;

string msgBody = txtMessage.Text.ToString();

msg.Body = msgBody;

SmtpClient smtp = new SmtpClient("localhost");

smtp.Send(msg);

}

catch (Exception ex)

{

lblStatus.Text = ex.Message;

}

 

My web.config settings are

 

<system.net>

<mailSettings>

<

How to intercept mail messages before reaching a SMTP server

  

I need an application that will intercept all incoming mail messages and modify them according to some specs. I am an absolute rookie at this, please detail :)

a)     I need to either hook into it's SMTP events, and modify the message before it is passed on to the local intended user.

or

b)    A SMTP proxy service, that sits in front of your real SMTP server. Inside of the SMTP proxy,

Send Email from SQL Server Express Using a CLR Stored Procedure

  
Problem
One of the nice things about SQL Server is the ability to send email using T-SQL. The downside is that this functionality does not exist in SQL Server Express. In this tip I will show you how to build a basic CLR stored procedure to send email messages from SQL Server Express, although this same technique could be used for any version of SQL Server.

Solution
If you have not yet built a CLR stored procedure, please refer to this tip for what needs to be done for the initial setup.

Toolbox: Create Graphs, Send E-Mail, Spell-Check, and More

  

Turn boring data into stunning graphs, create, parse, send, and receive mail messages from code, and more.

Scott Mitchell

MSDN Magazine August 2007


How to send mail to individual users.

  

Hi,

  I need to send the same mail to multiple users separately. I dont want to use comma delimeted "To Address" . Because other users can able to see the recipients.

   Each recipient should not know about the other recipients. 

   How will I achieve this one without for loop ?

Thanks.



send the login credentials from site to another server

  

hi,

  i have a site which uses windows credentials to login and in the site i have link to ssrs server.

when i select the report it asks for authentication which i want to skip and send the same user

crendentials to the ssrsserver to access the report.

can anyone suggest on this..


smtp server 5.1 in xp not sending emails

  

hi iam using asp.net 2.0 with c#.net.

in my application when client completes its shopping email will goes to user this works fine when there is internet connection is working fine,
if  there is some problem  in internet connection if one mail stops then all the mails will be stopped even now internet works fine,

how to resend the emails using smtp server, is there any option to resend the emails automatically when internet works fine.


can you give example which helps me.


send mail don't run

  
Dim strFrom = "NewsLetter@Kinesiologiaviva.it"             Dim strTo As String = String.Empty             Try                 Dim conn As SqlConnection                 Dim cmd As SqlCommand                 Dim cmdstring As String = "SELECT * FROM vw_MLDestinatari Where [NomeCont]='" & TxtGruppo.Text & "'"                 conn = New SqlConnection(SqlDataSource1.ConnectionString)                 cmd = New SqlCommand(cmdstring, conn)                 conn.Open()                 Dim myReader As SqlDataReader                 myReader = cmd.ExecuteReader(Data.CommandBehavior.CloseConnection)                 While myReader.Read                     strTo &= myReader("Mail") & "; "                 End While            &n
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend