I want to send mail from user gmail account using OAuth to all user contacts.It's easy to get all contacts of user with google API, but i cant send email to these contacts from user gmail account without request his password.
Server Error in '/' Application.The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not availableDescription: 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.Runtime.InteropServices.COMException: The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not availableSource Error:
Dim ObjmailMessage As MailMessage Dim swHTMLBody As StringWriter Dim twTextWriter As HtmlTextWriter
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:
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.
I have a "Contact Us" page where in users will give in their email id and a query and on submitting the form, web admin would receive that email.
If I configure their email id to "from" MailAddress and send the mail, it will fail to do so if the ID is from popular mail domains like gmail or hotmail but would work with other unpopular or non existent domains like email@example.com without any credentials provided!
It worked with gmail after I configured SMTP and network credentials properly. The aim is to let the admin of my website who receives the email be able to hit the reply button in his mail client and see the "to" field populated with the "from" field filled in "contact us" page. Is there any proper way to do this or a tip or trick to accomplish it.
I want to use gmail-mail servers, I have registrated to google app and I have my company mails in gmail. iam getting this error: System.Net.WebException: The remote name could not be resolved: 'smtp.gmail.com' WHy is this not working, Iam using the email and password
We at Our company having our own local network in which consists around 20 users. We do not have Internet connections. Now I've created an asp.net website to share the data among the different users.How to create unique mail ids for each user.
I want to get all contact list of email from Gmail, Yahoo or Hotmail in the ASP.NET and C#.
Instead of enter username and password on my page (and call the API for authentication), I am thinking to redirect to Gmail, Yahoo and Hotmail respectively for authentication (is it something called oAuth?) and authorization (consent) ?
It should redirect back to my page with all the contact list.
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
This code is working fine in my local system but when i upload it on server then it gives this error. From the last 1 year it was working fine but from last few days it gives me above said error, please suggest me is there any authentication required to send mail from server (my hosting plan is with 1and1.com)
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; From = dr["nm_EmailFrom"].ToString(); SMTP = dr["nm_SMTP"].ToString(); Port = dr["amt_Port"].ToString(); EmailId = dr["nm_emailUserId"].ToString(); [code]...
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 18.104.22.168:587"
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.
I am making mailing system and i am using SQL MAIL service and i need to send mail to other server(application and mail server on different locations).so i some how i need to use queue systems. for example if i send 5000 mail then it should go in batch of 500-500. if i write code in core vb.net then user need to stay untill all batches complete. so some how i need a system by which user just click and mail address fetching and sending process works in background as well send in batch.
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("firstname.lastname@example.org");
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.