Web Forms :: SmtpClient Versus Google Apps Emails
Oct 11, 2010
i am trying to send email using simple SMTPClient class, as the following code:
[Code]....
when i put the To email to be an Gmail,yahoo, hotmail email "as in example" or another domain.com email, the code is working with no issue, but when i put the recepient email to be any of Google Apps Emails, unfortunately the email didnot received. does the SmtpClient have a problem with google apps?
View 1 Replies
Similar Messages:
Feb 16, 2010
Learning how to do a master page in asp.net. Trying to figure out how my style sheet interacts with respects to the master page and content page. I can get HTML tags like body and the style sheet to react. But when I call the ID attribute of a label no styling takes place. What am I missing here as far as interaction? BTW I'm using VS2008
CSS sample:
body
{
height:1200px;
width:920px;
border-style:solid;
border-color:blue;
padding:10px 10px 10px 10px;
}
#toptext1
{
position:relative;
top:-225px;
right:-500px;
font-size:22px;
font-weight:bold;
}
From the master page:
<body>
<form id="form1" runat="server">
<asp:image id="cookNookLogo" ImageUrl="images/Logo.gif" runat="server"
AlternateText="CookNook" Width="449px"></asp:image>
<p>
<asp:Label ID="toptext1" runat="server" Text="Quality Recipes, Hints and Supplies"></asp:Label>
</p>
From the content page:
<%@ Page Language="C#" MasterPageFile="~/CNMasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link href="App_Themes/cn/cn.css" rel="stylesheet" type="text/css" />
</asp:Content>
When I was doing this without a master page it worked so where am I going wrong with the attributes?
View 3 Replies
Jul 26, 2010
I am trying to use System.Net.Mail SMTPClient to send emails. I have the sample code from MSDN:
[Code]....
What is the host name? I want to send emails using Exchange Online which I think the host is "red001.mail.microsoftonline.com"?
View 2 Replies
Aug 11, 2010
As an organisation, we use Google Apps. We have the paid version (mapped to our domain) etc...We are developing a web based application to manage orders, and other business functionality.I want to be able to use federated login with our google apps accounts-
For example, if a user is logged in to their email (gMail) - they should automatically be logged in to our ASP.net application
If they're not logged in - the log in form should auth. against our google apps account.How can this be done?Is it possible to be able to "get" the user who is currently logged in using this method etc...?
View 3 Replies
Apr 14, 2010
I would like to implement gmail / google apps inbox feed in my application. I know inbox feed gives me read only results, but I want to the same. I google and found this is possible through[URL]. But I don't know how to implement it in asp.net.
View 2 Replies
May 6, 2010
I'm needing to send around 500-2500 emails out at a time to internal email accounts. I'm wondering which was would be faster both for the mail server and for my client app. Should I send multiple emails with just different TO addresses, or just one with multiple BCC addresses? I tried testing this by sending a bunch to my own email and the multiple emails method work, but with the BCC and a single message I only get that single message in my inbox. Shouldn't I be getting as many copies as the number of times I put my address in the BCC line?
View 1 Replies
May 27, 2010
I am an ASP.NET newbie and I am trying to design an OpenID/SSO system for an internal web application. The web application is pretty simple and the authentication is currently being managed by a database with usernames and passwords. I want to replace the existing accounts stored in the database with Google Apps accounts.
I have downloaded the latest DotNetOpenAuth-3.4.3.10103 package and got the OpenIdRelyingPartyWebForms sample up and running on IIS. I have built my own login page using just a OpenIdButton object that points to a development Google domain.
The button seems to work fine in FireFox, at least it is forwarding me to the Google Apps login, but nothing happens when I load the same page in IE. When I click the Google button, nothing happens, zip. The same is true for the Yahoo button in the login.aspx page given in the sample.
Here is the .aspx code I am using...
[code]....
View 2 Replies
Mar 31, 2010
I am trying to send a basic email through Google Apps/Gmail using C# (System.Net.Mail/Framework 4) and I am having trouble doing so.
I am receiving the following exception: "The operation has timed out."
My code is below:
//Create the mail message
MailMessage mail = new MailMessage();
//Set the addresses
mail.From = new MailAddress("myemail@gmail.com", "My Name");
[Code]...
During my troubleshooting I have tried:
Using my personal gmail address as well as another from a domain hosted through Google Apps. Using ports 25, 465, and 587 Hard coding the config settings in the c# code instead of using the web.config Sending and telneting from multiple network locations to ensure the firewall/ISP was not blocking it Ensured that POP was enabled in the GMail settings (according to Google this should turn on the ability to send using SMTP)
Changing the send from and replyTo address to ensure they match the account (apparently a GMail necessity).
I am able to send and receive email fine through the GMail interface for both of my email accounts. I have also tried the settings and solutions offered in Question # 757987 to no avail.
View 1 Replies
Nov 11, 2010
I'm trying to send email via google apps from my asp.net app and am getting the following 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 "}
My Web.config has the following values:
<system.net>
<mailSettings>
<smtp from="user@domain.com"
deliveryMethod="Network">
<network host="smtp.gmail.com"
port="587"
userName="user@domain.com"
password="password"
enableSsl="true"/>
</smtp>
</mailSettings>
View 2 Replies
Nov 27, 2010
My company uses Google Apps for our e-mail/business app provider. Every employee has an account here.I'm looking into creating an asp.net web app that would allow users to sign-in (using their Google Apps account) and then accomplish certain things (first goal: keep a current record of the employee's skillset).Before I get started, I wanted to find out if an OpenID login system using Google Apps is any more difficult than doing it the standard way, or if I need to be aware of any pitfalls.
View 2 Replies
Sep 9, 2010
I am trying to implement OpenId for an internal web app. Our college is on Google Apps for Edu, so we have the suite of Google OpenID and OAuth exposed to us.
I would like my login page to have the standard username and password, and additionally a button on the side that will authenticate internal users to our app domain.
I have followed the example here [URL] but it seems that the rules are different for the google apps id than a general google id.
View 1 Replies
Jan 16, 2011
I am trying to send an email from asp.net using a google apps email.
I found this question which did not resolve the issue
Send Email via C# through Google Apps account
The part that I am really confused about is that it works with these settings
<smtp from="****@gmail.com" deliveryMethod="Network">
<network host="smtp.gmail.com" port="587"
userName="****@gmail.com" password="****"[code]....
and get the following error message
"The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required."
I found this article as well http://www.google.com/support/forum/p/Google+Apps/thread?tid=2cbb54572fea6939&hl=en and worked through this but that did not resolve me issue either.
View 1 Replies
Sep 16, 2010
What is the difference between; Deploying an application Releasing an application Implementing an application
View 1 Replies
Jul 23, 2010
I've gone rounds with this ever since I started programming classic ASP 12 (or so) years ago and I've never found a great solution because the architecture of ASP and ASP.NET has always been a swamp of bad practices, magic shared singletons, etc. My biggest issue is with the HttpApplication object with its non-event events (Application_Start, Application_End, etc.).
If you want to do stuff once for the entire lifespan of an HTTP application, Application_Start is the obvious place to do it. Right? Not exactly. Firstly, this is not an event per se, it's a magic naming convention that, when followed, causes the method to be called once per AppDomain created by IIS.
Besides magic naming conventions being a horrible practice, I've started to think it might be a reason there exist no such thing as a Start event on the HttpApplication object. So I've experimented with events that do exist, such as Init. Well, this isn't really an event either, it's an overridable method, which is the next best thing.
It seems that the Init() method is called for every instantiation of an HttpApplication object, which happens a lot more than once per AppDomain. This means that I might as just put my startup logic inside the HttpApplication object's constructor.
Now my question is, why shouldn't I put my startup logic in the constructor? Why does even Init() exist and do I need to care about Application_Start? If I do, can anyone explain why there is no proper event or overridable method for this pseudo-event in the HttpApplication object?
And can anyone explain to me why in a typical ASP.NET application, 8 instances of my HttpApplication are created (which causes the constructor and Init to run just as many times, of course; this can be mitigated with locking and a shared static boolean called initialized) when my application only has a single AppDomain?
View 2 Replies
Nov 17, 2010
dataContext.saveSend(true);
SendEmailsToAllMembers();
I have the code above, if after half of the emails were sent out, there is a error in smtp, then how can I avoid resending emails or missing emails in this cases ?
View 1 Replies
Aug 11, 2010
i've encountered some problems sending an email to disignated email address that i passed in.
they gave me this error
[Code]....
what does the Parameter name: address means??
View 4 Replies
Sep 17, 2010
I use SmtpClient to send email. I want to ensure that the SMTP connection gets closed after each message is sent. I found an explanation of how to do this in the SmtpClient documentation on MSDN:
[URL]
One thing it says is: Call Dispose when you are finished using the SmtpClient. The Dispose method leaves the SmtpClient in an unusable state. After calling Dispose, you must release all references to the SmtpClient so the garbage collector can reclaim the memory that the
SmtpClient was occupying.
I have a question about the last part. What exactly does "release all references" mean. How do I do that?
View 3 Replies
Mar 21, 2011
I am able to get a token with Windows Live Delegate Authentication samples provided by Microsoft.
Now I want to access emails (New, Read, Unread etc) from live account. How can I achieve it with the help of Windows Live Delegate Authentication? Are there any examples for the same?
The Samples given by Microsoft are not related to emails.
View 2 Replies
Jul 21, 2010
Dear sir all i want to know is that is this that best way to send mail to listof users provided that i need to had my custom html template as well.
[Code]....
And this is how i call this function to send multiple mail
[Code]....
View 9 Replies
May 21, 2010
I can specify a port number with SmtpClient object in ASP.NET, what I am wondering is, is that just the port .NET uses to send mail to the SMTP server? Or will that dictate what port for the SMTP server to use? Or is it that it MUST match the port configured for the SMTP server?
View 2 Replies
Jan 13, 2011
When using the system.net/mail web.config settings to configure my SmtpClient, it fails to deliver emails, with an "protocol error" described best by Base64 encoding and authentication problems:
Example:
With the following Config
<system.net>
<mailSettings>
<smtp from="[URL]">
<network host="[URL]"
port="2525"
defaultCredentials="false"
userName="username"
password="password"/>
</smtp>
</mailSettings>
</system.net>
And the Code:
var tmp = new SmtpClient();
MailMessage msg = new MailMessage();
msg.Subject = "test";
msg.From = new MailAddress("[URL]");
msg.To.Add(new MailAddress("[URL]"));
msg.Body = "test";
tmp.Send(msg);
Produces the error message:
System.Net.Mail.SmtpException: The server committed a protocol violation The server response was: UGFzc3dvcmQ6
at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException
& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
However, in the following code where I manually set all the properties, the code runs without exception and the email is delivered.
var tmp2 = new SmtpClient("[URL]", 2525);
tmp2.Credentials = new NetworkCredential("username", "password");
tmp2.UseDefaultCredentials = false;
MailMessage msg = new MailMessage();
msg.Subject = "test";
msg.From = new MailAddress("[URL]");
msg.To.Add(new MailAddress("[URL]"));
msg.Body = "test";
tmp2.Send(msg);
View 3 Replies
Jul 13, 2010
I am having some problems sending emails (using gmail). I have an application that allows a user to send an email, request info, etc. I want the email "from" address to be from the initiating user. I set up the settings in the web.config for the first time. Previously, I had always set up the info directly in the code. The email is sending just fine. However, the from address shows the user name correctly but the email address in the one in the web.config.ie. "User From Name <web.config from address>". In the code, the MailMessage object shows it correctly ("User From Name <User from address>"), and the SMTPClient From address shows the web.config from address. This is going to be confusing for the recipient of the emails to see the config address with the user name.
I tried removing the From address from the config(leaving the required userIDpw for the email logon, but no difference. I also tried removing the config mail settings completely and putting it back in the code. Still no luck.
How can I get the from address to be the valid email address in resulting email?
View 1 Replies
Feb 24, 2011
How do I format the body of the email so it doesn't look so old school :) I've tried sending html through it, but it just comes out as html in the body of the email.
View 2 Replies
Mar 10, 2011
I am trying to send attachment mails in asp.net pages using SmtpClient Send() method.
It is working fine with 2mb files. When i tried with 7mb attachment file, it is saying:
"Failure sending mail."
What is the max size for sending mail using SmtpClient.Send(message) method.
Why the above error coming.....?
View 3 Replies
Jul 13, 2010
I am working on a project where one of the requirements is to re-write an ASP.NET application. The old ASP.NET application was based on .NET Framework 1.1. The new ASP.NET application is based on .NET Framework 3.5.
One of the functions in the old web application was the ability to send email. The old code used the System.Web.Mail.SmtpMail class, whereas the new web application uses the System.Net.Mail.SmtpClient class.
In testing this on our development servers, everything worked fine. However, we have two beta clients testing out our software, and they both run into problems sending email in the new web application.
The specific exception is as follows:
"Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it"
Both the old and new ASP.NET application are on the same server (Windows Server 2003). They both are using the same Exchange mail server. Why is it that the old ASP.NET application can successfully send email, but the new one cannot?
I looked at the old code, and it did not use any form of authentication, it just specified the sender's email address, the recipient's email address, the subject, body, and server, and sent the message. I did the same thing in the new code, with the only difference being that I used the SmtpClient class.
Below is a code snippet from the new ASP.NET application:
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
mail.To.Add(messageTo);
mail.From = new MailAddress(messageFrom);
mail.Subject = messageSubject;
mail.Body = messageBody;
SmtpClient client = new SmtpClient();
client.Host = smtpServer;
client.Send(mail);
View 3 Replies