Title:
erewr
Name:
erer
Date:
11/7/2009 2:08:13 PM
Comment:
erer
|
Title:
a
Name:
a
Date:
11/6/2009 10:51:30 AM
Comment:
a
|
Title:
Automatic Sending E-mail
Name:
Jaime Corte Real
Date:
10/30/2009 7:43:30 AM
Comment:
Sridhar, use the scheduler task.
|
Title:
sending mail
Name:
sridhar
Date:
10/4/2009 9:11:06 AM
Comment:
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
i got this problem please tellme how to send
|
Title:
Automatic Sending E-mail
Name:
Sridhar
Date:
9/7/2009 12:44:48 AM
Comment:
the above code is good. I need to send mails automatically everyday.How can i add windows services.
|
Title:
sending Mail
Name:
Quest
Date:
8/28/2009 5:38:23 AM
Comment:
good one which is useful to me
thanks Quest
|
Title:
send msg with defualt credential in asp.net
Name:
sanjay
Date:
8/10/2009 8:50:13 AM
Comment:
please help me how send send email msg with defualt credential in asp.net
|
Title:
Jojo
Name:
jojo
Date:
7/29/2009 3:01:49 AM
Comment:
Thanks for this It worked for me
|
Title:
Web Design Company
Name:
Software Company
Date:
7/22/2009 12:54:05 AM
Comment:
Nice article.
|
Title:
mr
Name:
finder
Date:
7/12/2009 3:48:23 PM
Comment:
thanku
|
Title:
Sending mail Using Guest Account
Name:
Anubhava Dimri
Date:
7/11/2009 12:45:00 AM
Comment:
Hi All, I am sending mail by using Administrator and Standard account it works properly. But when i try to send mail using guest account it generates following errror.
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. v32sm3231164wah.13
If u have any solution for this issue.
|
Title:
Problem with code.
Name:
Almiro Alves
Date:
7/9/2009 10:21:35 AM
Comment:
I received the following error when used this code:
System.Exception: Mailbox name not allowed. The server response was: Sorry, that domain isn't in my list of allowed rcpthosts. ---> System.Net.Mail.SmtpFailedRecipientException: Mailbox name not allowed. The server response was: Sorry, that domain isn't in my list of allowed rcpthosts. at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) ------------------------------------------------------------
I'm using this code:
MailMessage msg = new MailMessage(); msg.From = new MailAddress("almiro.alves@using.com.br"); msg.To.Add(new MailAddress("almiro.alves@using.com.br")); msg.Subject = "Teste de envio"; msg.Body = "Testando o envio de e-mail através de um WebService."; msg.IsBodyHtml = true;
SmtpPermission x = new SmtpPermission(SmtpAccess.ConnectToUnrestrictedPort); SmtpClient smtp = new SmtpClient(); smtp.EnableSsl = false; smtp.Host = "smtpout.secureserver.net"; smtp.Port = 80; smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.UseDefaultCredentials = false; smtp.Credentials = new System.Net.NetworkCredential("almiro.alves", "******", "using.com.br"); smtp.Send(msg);
Anyboy help me please for this problem?
Tks.
|
Title:
Send Mail Error!
Name:
praveen
Date:
7/9/2009 6:02:58 AM
Comment:
pls help me when i send a message it shows "Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed".
pls Reply.
|
Title:
Sending mail For Hotmail
Name:
Anubhava Dimri
Date:
5/30/2009 2:46:16 AM
Comment:
Hello All, I have generating one issue regarding to sending mail by hotmail.
|
Title:
something difference
Name:
gogoahead
Date:
5/19/2009 12:38:51 PM
Comment:
my code works fine,and like this: MailMessage mm = new MailMessage(); mm.From = new MailAddress("from@gmail.com"); mm.To.Add(new MailAddress("to@mail.com")); mm.Subject = "hi"; mm.Body = "hi"; mm.IsBodyHtml = false; SmtpClient sc = new SmtpClient(); sc.Host = "smtp.gmail.com"; sc.Port = 587; sc.Credentials = new NetworkCredential("from@gmail.com", "password"); sc.EnableSsl = true; sc.DeliveryMethod = SmtpDeliveryMethod.Network; sc.Send(mm); the main code works fine ,but when i add the line "sc.UseDefaultCredentials =false;" like the article does.it's throw the exception and something like "the server response was XXXX".so just forget about the "sc.UseDefaultCredentials =false;" i don't known why this happen? but for the success delivery of email.maybe you should delete the code line "mailClient.UseDefaultCredentials = False"
|
Title:
"From email" different
Name:
Dipsa
Date:
4/6/2009 2:40:48 AM
Comment:
the code is works fine. but instead of From email which we have set it shows smtp mail server account. how to solve this? how the actual From address will be shown in email? please reply.
|
Title:
Thanks
Name:
khalidmehmoodawan@gmail.com
Date:
3/31/2009 5:39:23 AM
Comment:
thanks for the code.
It worked for me.
|
Title:
Operation Time out error.
Name:
Manjusha
Date:
2/27/2009 6:17:26 AM
Comment:
My mail ID is manjusha.dhabale@gmail.com
|
Title:
The operation has timed out.
Name:
Manjusha
Date:
2/27/2009 6:15:14 AM
Comment:
try { ArrayList items = new ArrayList();
FileStream EmpList = new FileStream(Application.StartupPath +WindowsApplication1.Properties.Settings.Default.EmailFile.ToString() , FileMode.OpenOrCreate, FileAccess.Read); FileStream Template = new FileStream(Application.StartupPath + WindowsApplication1.Properties.Settings.Default.TemplateFile.ToString(), FileMode.OpenOrCreate, FileAccess.Read); StreamReader EmpListReader = new StreamReader(EmpList); StreamReader TemplateReader = new StreamReader(Template);
string EmpInfo, mailbody; mailbody = TemplateReader.ReadToEnd(); //Assigning template file to the string String customizemail; int NoOfEmp = 0; while ((EmpInfo = EmpListReader.ReadLine()) != null) {
string[] EmpInfoItems = EmpInfo.Split(','); for (int i = 0; i < EmpInfoItems.Length; i++) { items.Add(EmpInfoItems[i]);
DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); string strdate = date.ToString("D");
// Replacing "Name" by employee name in template //customizemail = mailbody.Replace("<Name>", EmpInfoItems[0].ToString()); customizemail = mailbody.Replace("{DATE}", strdate);
String emailID = EmpInfoItems[i].ToString(); if (emailID.Contains("@")) { NoOfEmp = NoOfEmp + 1; MailAddress to = new MailAddress(emailID);
|
Title:
"From email " is different
Name:
rahel
Date:
2/23/2009 5:23:22 PM
Comment:
thanks for the code is works perfectly but the only problem is instead of from email it shows my smtp mail server account which is (myemail@gmail.com). How can I make it to appear an email from a textbox for the from email part????
|
Title:
Extra fix for GMAIL send
Name:
John
Date:
2/20/2009 5:24:11 AM
Comment:
if you are sending from gmail and get a Must issue a STARTTLS command first. Error the fix for me was adding mailClient.EnableSsl = True
|
Title:
Still having the issue
Name:
Nallamani
Date:
2/17/2009 5:21:01 AM
Comment:
I am not able to send the mail with the NetworkCredential object......I am getting the following error: System.Net.Mail.SmtpException: Failure sending mail. ---> System.FormatException: Invalid length for a Base-64 char array. at System.Convert.FromBase64String(String s) at System.Net.NTAuthentication.GetOutgoingBlob(String incomingBlob) at System.Net.Mail.SmtpNtlmAuthenticationModule.Authenticate(String challenge, NetworkCredential credential, Object sessionCookie) at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at Email.Send() at Radiotag.forgotpassword.fnsendmail() at Radiotag.forgotpassword.fnsubmit()
|
Title:
Thanks Man
Name:
Mick
Date:
2/16/2009 5:55:08 PM
Comment:
Perfect mate. Bailed me out of trouble. Now it makes sense
|
Title:
Almost there
Name:
Martin
Date:
2/10/2009 12:25:05 PM
Comment:
Great article, thanks. I'm still getting the "5.7.1 Client was not authenticated". I have tested the connection to the SMTP server using telnet and sent a mail using the same credentials as in my ASPX file. However when connecting via telnet, the username and password have to be base64 encoded. Any ideas appreciated.
|
Title:
Sending SMTP Authenticated E-mail Using ASP.NET 2.0
Name:
Dan Heath
Date:
2/4/2009 8:31:03 PM
Comment:
Thank you, exactly what I needed.
|
Title:
Good Article
Name:
Thomas
Date:
12/16/2008 2:19:59 AM
Comment:
This is good article.For gmail authentication chech http://techdotnets.blogspot.com/
|
Title:
great thanks
Name:
andrew
Date:
11/22/2008 4:49:06 PM
Comment:
great code thanks.
for those who it doesnt work for - check it plugged in (i.e don't forget the mail namespace)
|
Title:
send mail
Name:
anna
Date:
11/11/2008 12:42:06 AM
Comment:
plz help me.... urgent plz give me a code for send a mail using SMTP
|
Title:
SMTP porblem
Name:
chetan
Date:
10/15/2008 2:35:24 AM
Comment:
My mail also sending fail gives error "Mailbox unavailable. The server response was: Authentication is required for relay" but i use proper domain name and password Please help
|
Title:
worst
Name:
radhika
Date:
10/6/2008 7:26:26 AM
Comment:
my email is sending failed.becuse of smtp
|
Title:
Useless
Name:
Shefali
Date:
9/19/2008 7:42:49 AM
Comment:
Hi.I used this code but its not solved my problem.My problem is SMTP is not installed on server side.My mail sending failed.
|
Title:
SMTP
Name:
Yogesh Trivedi
Date:
9/18/2008 6:27:51 AM
Comment:
Please send me the Code to receive the Mail on my ASP.net page and also code to receive Delivery Reports. Please help me .........
|
Title:
gmail smtp
Name:
Rahul Anand
Date:
9/15/2008 11:46:02 PM
Comment:
Please send me the Code to receive the Mail on my ASP.net page and also code to receive Delivery Reports. Please help me
|
Title:
Email only comes from Credential user
Name:
Russ
Date:
9/8/2008 12:44:21 PM
Comment:
I am using code just like this and it has always worked. Using gmail, ssl, etc.. the issue is that the emails ALWAYS come from the user I am using in the credentials, which is generic, and not the email address I add in the "FROM" portion. Anyone had this happen before? Thanks!
Russ
|
Title:
where is delivery reports for sending mail
Name:
sasikumar
Date:
9/5/2008 9:57:07 AM
Comment:
i use smtpsend mail option .. i send perfact but not recived delivery reports ..how is possible that one ?
|
Title:
Thanks a Lot
Name:
Samuel Rajan
Date:
9/4/2008 8:54:01 AM
Comment:
Thanks a lot, earlier from local host, mails use to get into spam but now it is not a spam. Thank you once again!
With Regards Samuel Rajan
|
Title:
SMTP Mail delivery on time& date
Name:
Ashwin
Date:
9/4/2008 4:14:13 AM
Comment:
I would like to ask u about, how to send an email at a particular time and date. when iam not available at that time near desktop. It is like this, I want to send a mail by setting a time previously so that that mail shud b sent at that paricular time and date. i need this solution in .net. iam working under Web application.
send to ashwinkumar.samba@gmail.com With Regards, Ashwin
|
Title:
Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
Name:
Iquad
Date:
8/16/2008 2:43:51 AM
Comment:
this code worked using gmail account from my local machine. but when uploaded in Godaddy ,i got this eeor msg
Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
pls help me.
|
Title:
Thank you
Name:
Sandeep
Date:
7/30/2008 9:47:59 AM
Comment:
Thank you for the code.I spend my three day and finally i got solution from site. keep it up.[:D]
|
Title:
Getting error when setting smtp.Port
Name:
chau
Date:
7/25/2008 1:05:56 PM
Comment:
I got this error when I set smtp.Port = 587 Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] Does anyone know how to solve this? Thanks, Chau
|
Title:
not getting mail at yahoo,gmail etc...
Name:
ankit
Date:
6/18/2008 2:33:58 AM
Comment:
not getting mail at yahoo,gmail etc...
|
Title:
The operation has timed out.
Name:
Raman
Date:
6/13/2008 2:52:11 AM
Comment:
try { MailMessage message=new MailMessage();
message.From = new MailAddress(txtSender.Text.Trim()); message.To.Add(new MailAddress(txtReceiver.Text.Trim())); message.Subject = txtSubject.Text.Trim(); // sets the subject property of message message.Body = txtBody.Text.Trim(); // sets the body for the message
//message.Priority = MailPriority.High; message.IsBodyHtml = false; SmtpClient client = new SmtpClient("smtp.googlemail.com", 587); System.Net.NetworkCredential basicAuthentication = new System.Net.NetworkCredential("pundirraman@gmail.com","mygmailpassword"); client.EnableSsl = true; client.UseDefaultCredentials = false; //Put your own, or your ISPs, mail server name onthis next line client.DeliveryMethod = SmtpDeliveryMethod.Network; client.Credentials = basicAuthentication;
client.Send(message); return true; }
but i m getting time out problem.. its urgent... please help.. my mail id is pundirraman@gmail.com
|
Title:
attachment
Name:
fathur
Date:
5/19/2008 12:34:46 PM
Comment:
Dear all, I am using gmail with attachment, here the below code:
SmtpClient sc = new System.Net.Mail.SmtpClient(); sc.UseDefaultCredentials = false; sc.Credentials = new System.Net.NetworkCredential("fathur027@gmail.com", "myfathur"); sc.Port = 587; sc.Host = "smtp.gmail.com"; sc.EnableSsl = true;
MailMessage mm = new MailMessage(); mm.From = new MailAddress(emailTujuan, ddlUpload.SelectedValue, System.Text.Encoding.UTF8); mm.To.Add(new MailAddress(emailTujuan, ddlUpload.SelectedValue)); mm.Subject = "testing Ui..."; mm.Body = "Ini adalah isi body";
Attachment dataAttached = new Attachment(FileYangDiKirim); mm.Attachments.Add(dataAttached);
try { sc.Send(mm); mm.Dispose(); TextBox1.Text = "Send Sukses"; } catch (Exception ex) { TextBox1.Text = ex.Message; }
but i found error on this. here the error message:
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. q20sm13434521pog.7
any body can help me....
thanks fathur rosi fa-thur@hotmail.com
|
Title:
it doesn't work
Name:
tarra
Date:
5/15/2008 2:44:43 AM
Comment:
:(
|
Title:
Mail format on gmail or yahoo
Name:
gunwant
Date:
4/18/2008 9:52:05 AM
Comment:
Hi ,
I am using gmail smtp server to send notifications from my web application to users.
I am able to send notificatiopns to various email addresses , but those are not formatted .
All body message is comming in one line.
Please can you help me formatting the mail.
Regards Gunwant
|
Title:
Question
Name:
ber
Date:
4/18/2008 6:04:09 AM
Comment:
Hi, I have tried entering an invalid password and username but I still receive the email. Is this suppose to be so ? If not, what could have happened? Thanks for your help.
|
Title:
Worked very well
Name:
Inet26
Date:
4/5/2008 6:42:30 AM
Comment:
Thanks....
|
Title:
Project
Name:
Gopi
Date:
4/2/2008 10:31:11 AM
Comment:
Hello sir i m doing my final year project i want code for remote mail using asp.net
|
Title:
SMTP server error
Name:
Tushar Mehere
Date:
4/1/2008 1:30:45 AM
Comment:
I got the error below: "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 g25sm6623743wag.37"
My issue got resolved with the code below:
public void MailSend() { //Add the Creddentials SmtpClient client = new SmtpClient(); client.UseDefaultCredentials = false; client.Credentials = new System.Net.NetworkCredential("yourgmailusername@gmail.com", "yourgmailpassword); client.Port = 587; client.Host = "smtp.gmail.com"; client.EnableSsl = true; //this is required
//Builed The MSG System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage(); msg.To.Add("someemailid@gmail.com"); msg.To.Add("anotheremailid@gmail.com"); msg.From = new MailAddress("sendersemail@gmail.com", "senders name", System.Text.Encoding.UTF8); msg.Subject = "Thanx From XYZ"; msg.SubjectEncoding = System.Text.Encoding.UTF8; msg.Body = "Email sent thru app"; msg.BodyEncoding = System.Text.Encoding.UTF8; msg.IsBodyHtml = false; msg.Priority = MailPriority.High;
try { client.Send(msg); lblErrorMessage.Text = "Message sent successfully"; } catch(Exception ex) { lblErrorMessage.Text = "Message not sent"; }
}
Thanx, Tushar Mehere
|
Title:
Exception
Name:
Shaikh
Date:
2/25/2008 12:40:05 AM
Comment:
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for akhtar195@gmail.com
|
Title:
SMTP Mail Message
Name:
Lokesh
Date:
2/13/2008 8:21:18 AM
Comment:
Hi I need to identified that mail sending by Smtp has been deliverd successfully to the reciever or not as the method of SMTP.Send() returns void. Having so we can not identified wethere mail has been deliverd or not.
|
Title:
Nice Greate JOB
Name:
Anand
Date:
2/7/2008 11:36:31 PM
Comment:
Great!!
|
Title:
Problem by Host
Name:
Manu Ram Pandit
Date:
1/31/2008 6:47:55 AM
Comment:
"An existing connection was forcibly closed by the remote host"
Please help me to find out how to find out solution for this problem
|
Title:
SMTP mail
Name:
inzaghi
Date:
1/17/2008 10:38:07 PM
Comment:
sorry , but I tried a lot with 2 server : google mail and yahoo mail , setting host and port correctly but the program have error while trying to connect to the server for sending email . Do you really make sure that this code is already enough for running .
|
Title:
SMTP mail Sending throuh Yahoo or GMAIL in VB6
Name:
Raza
Date:
12/11/2007 3:33:12 AM
Comment:
\
|
Title:
very good
Name:
mike
Date:
12/8/2007 10:05:54 PM
Comment:
not bad
|
Title:
How to send e-mail automatic via ASP.Net v2.0
Name:
Santanu Maity
Date:
11/29/2007 4:21:49 AM
Comment:
How to send e-mail automatically every day in a particular time without clicking any button via ASP.Net v2.0. And also make a schedule for fireing the mail event.
|
Title:
too good
Name:
Sachin
Date:
11/27/2007 12:25:14 AM
Comment:
Thanks for explaining the complicated concept in simple understandable words regards
|
Title:
Very Good!
Name:
Patrick
Date:
11/22/2007 9:11:54 AM
Comment:
Thanks for sharing, works perfectly! (had to use Rohan tip)
|
Title:
Thanks
Name:
Mark
Date:
11/16/2007 5:28:58 PM
Comment:
Thanks, that's great!
|
Title:
Thanks
Name:
Patricia Marchand
Date:
11/6/2007 10:03:10 AM
Comment:
I have spent days trying to find out how to email from asp.net 2005! thanks to you I have now done it! (so wish packages would come with some type of documentation).
|
Title:
Thanks for this code
Name:
sunil
Date:
10/11/2007 1:40:01 PM
Comment:
Using this code i geet 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 b5sm4245639rva" Please help thanks
|
Title:
Thanks for this code
Name:
sunil
Date:
10/11/2007 1:35:08 PM
Comment:
This code gives error time out, please can u help regarding this if yes then please mail on this id sunil_raina77@yahoo.com thanks
with regards sunil
|
Title:
Tip
Name:
Rohan
Date:
9/19/2007 12:40:24 PM
Comment:
One important point to note is that, if DefaultCredentials are not used then "UseDefaultCredentials" property should be set to false before setting the Credentials property. If we set UseDefaultCredentials property after setting the Credentials property then it will throw error saying: "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required ". Actually if we dont set the UseDefaultCredentials when we use Credentials property then also it works fine.
Hope this helps... Thanks
|
Title:
Thankyou Sir...
Name:
Umesh
Date:
8/23/2007 4:12:14 AM
Comment:
It is working very fine and quick. Further do u have any sample prog. for receiving messages. If yes plz. send me link to umeshsvb@rediffmail.com
|
Title:
Thank you so much
Name:
Amrit Ray
Date:
7/2/2007 9:13:54 AM
Comment:
Thank you so much. I had to launch www.2findnow.com website and could find the solution for sending email to registerd users. But your solution just worked like magic. Thank you.
|
Title:
Thank you
Name:
sandesh
Date:
6/25/2007 5:30:41 AM
Comment:
Thank you very much it helped me, i was searching solution from last 4 days.
Actually my mails are getting junked when i was sending those through localhost but this code is worked for me.
But when i was running this code on local machine it was giving me errors, let it be but worked on internet
Thank you
|
Title:
SMTP Authentication
Name:
Santosh H Raut
Date:
6/24/2007 10:16:10 AM
Comment:
The above code is fantastic and it worked for me. Thanks and lots.
|
Title:
CDO.Message
Name:
seo software reviews
Date:
6/20/2007 6:29:40 AM
Comment:
Yet another .net component giving that strange CDO.Message error when there is no error at all. I recommend using FreeSmtp.net rather.
|
Title:
Mail Authentication
Name:
Srinivasa Rao
Date:
6/18/2007 7:11:03 AM
Comment:
Very good article to authenticate ur domain server outgoing
|
Title:
It's Good
Name:
Sreenivasa Rao
Date:
6/18/2007 7:09:33 AM
Comment:
Very good ,this is usefull when ur domains restricting to send out from ur servers Thanks
|
Title:
webdude
Name:
dude
Date:
6/15/2007 2:44:53 PM
Comment:
THANK YOU!!!! I've been hunting around for a couple weeks now and this is the first one that laid it out so well. It worked perfectly.
And the article is from 2006 lol!
|
Title:
Mail issue
Name:
Sree
Date:
5/11/2007 1:58:14 AM
Comment:
Hi, I am not able to send the mail, when i getting the from & To mail id 's from the database. I am using sql server 2000.
|
Title:
this
Name:
sree
Date:
5/11/2007 1:55:51 AM
Comment:
this is the test mail from the application
|
Title:
vlad
Name:
Multiple body parts
Date:
5/3/2007 2:30:25 AM
Comment:
Hi Mail gurus. Did anyone figure out how to send multiple body parts: like text and html and then let system to choose a right one?
|
Title:
very god
Name:
leonardo
Date:
5/2/2007 1:13:09 PM
Comment:
I´m from brazil, this help me for my work, thanks.. my inglesh is bad, very bad... kkkkkk.. translating for portuguese... Eu sou do brasil, isso me ajudou muito para o meu trabalho, obrigado. kkkkkkk
|
Title:
Permission request failed!
Name:
Ali
Date:
4/22/2007 6:37:20 AM
Comment:
Vivek G, thanks for the code. I have tried your code in a small application and this was what i got: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Any thoughts anyone?
|
Title:
Great!!! it works
Name:
Vivek G
Date:
3/22/2007 2:39:53 PM
Comment:
Try this, it will work //Port was 587 MailMessage msgMail = new MailMessage("yourmail@gmail.com", "tomailid@yahoo.com"); msgMail.Subject = "Test"; msgMail.Body = "Test"; SmtpClient s = new SmtpClient(); s.Host = "smtp.gmail.com"; NetworkCredential basicAuthenticationInfo = new NetworkCredential("yourmail@gmail.com", "mailpassword"); s.UseDefaultCredentials = false; s.Credentials = basicAuthenticationInfo; s.EnableSsl = true; s.Send(msgMail);
|
Title:
send mail working
Name:
jero
Date:
3/20/2007 10:38:26 PM
Comment:
Thank you every much for sharing your email sending code. Now I have run it successfully.
|
Title:
Thanks
Name:
Dardino
Date:
3/15/2007 7:31:56 AM
Comment:
Thanks, Thanks, Thanks, Very Thanks!!
|
Title:
No Auth
Name:
Brad
Date:
2/26/2007 6:31:05 AM
Comment:
Sure, code for no authentication is here: http://www.orcsweb.com/articles/send_email_from_dotnetv2.aspx
http://www.orcsweb.com Managed Complex Hosting #1 in Service and Support
|
Title:
is there any way to send mail without authentication..??
Name:
virat
Date:
2/23/2007 12:31:31 AM
Comment:
this article is very helpful... but i want to know is there any way to send mail without giving authentication to smtp server...??? reply..
|
Title:
Excellent
Name:
MajorHB
Date:
2/14/2007 5:39:37 AM
Comment:
Excellent example, helped me... keep continuing to submit sound solutions! Thank You.
|
Title:
sending mail with authentication
Name:
Barbara
Date:
1/28/2007 10:12:22 AM
Comment:
HI! Can someone help me with this error. I am trying to send an e-mail with ASP.NET
With the following code I get e time-out error operation.
MailMessage mail = new MailMessage("barbara.prueba@gmail.com", "barbara.prueba@gmail.com"); mail.Subject = TextBox1.Text; mail.Body = TextBox4.Text; SmtpClient smtp = new SmtpClient("smtp.gmail.com", 465); smtp.Credentials = new NetworkCredential("barbara.prueba@gmail.com", "xxxxx"); smtp.UseDefaultCredentials = false; smtp.EnableSsl = true; smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.Send(mail);
If I use smtp.googlemail.com and port 587 I get error: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required h20sm9797379wxd
In gmail I enabled POP for all mail.
Please, help me. Thanks.
|
Title:
send SMTP authenticated e-mail using ASP.NET 2.0
Name:
Karen
Date:
1/18/2007 11:49:10 PM
Comment:
I have tried miles of code and nothing works. This should not be this difficult! I'm using GoDaddy for my site so I've found lots of references to problems related to them. None of those fixes work. The code all looks pretty much the same but I cannot get any of it to send mail.
I have a very simple form with a Done button. When the user clicks the button, the form info goes to my Access database. What I want is to get an automatic e-mail whenever someone fills out the form. I'm using VWD Express, ASP.NET 2.0, GoDaddy, Windows XP... what else should I tell you except I have spent way too many hours Fussing with this. Can anyone, someone, please help me?
|
Title:
Please Help
Name:
Sean
Date:
12/15/2006 12:53:10 AM
Comment:
I have been tryin to use similar code but using yahoo smtpp server. Will that work? if yes can you provide me with the code please
|
Title:
Another example on how to send emails using asp.net 2.0
Name:
Mr DotNet
Date:
12/5/2006 9:15:28 PM
Comment:
Simple SMTP Authenticated example on how to send emails using asp.net 2.0 with C#. It uses
http://www.dotnetspace.com/articles/general-articles/sending-emails.html works for asp.net 2.0 version.
|
Title:
email successfully sent?
Name:
Brad Kingsley
Date:
11/3/2006 7:06:50 PM
Comment:
You would need to check the SMTP service logs. The code just hands off to the SMTP service and doesn't know for sure if the email is delivered or not.
~bk
|
Title:
doubt
Name:
ali
Date:
11/3/2006 5:56:31 AM
Comment:
Dear sir, how can we confirm that the email is successfully sent? any return values from the smtp server?
|
Title:
Yahoo SMTP
Name:
Brad
Date:
10/25/2006 11:01:50 AM
Comment:
Ally,
It sounds like you are trying to use Yahoo's mail server for the mailClient.Host setting. You cannot do this - they will not allow it because of their spam controls. You should use either your local SMTP service running on your machine, or the SMTP server for your ISP.
~Brad
|
Title:
Cannot send email to Yahoo!
Name:
Ally
Date:
10/25/2006 8:41:46 AM
Comment:
Hi!
Example is great...except that I cannot send email to Yahoo! I've checked Sender/From, usrname, password, Server/IP/port and ven firewall, but I kept getting this message :
System.Net.Mail.SmtpException: Erreur de syntaxe, commande non reconnue. La réponse du serveur était : yahoo.com closing transmission channel. You must be pop-authenticated before you can use this smtp server, and you must use your yahoo mail address for the Sender/From field. à System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result) à System.Net.Mail.SmtpTransport.EndSendMail(IAsyncResult result) à System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result)
Can u shed any light
|
Title:
Sending email
Name:
Steve Schofield
Date:
10/12/2006 8:27:25 AM
Comment:
Thanks DJ for posting the code to connect to gmail.
|
Title:
Re: A Method for Google
Name:
wy
Date:
10/12/2006 12:08:16 AM
Comment:
Hey DJ. Thanks a lot for the google code. i was pulling my hair out trying to figure out how to get it working with google. I was just wondering if you knew why it didn't work with the settings that gmail tells us to use with our mail clients: smtp server: smtp.google.com port: 465
these are the settings i use in outlook and they work fine. why not in .NET?
|
Title:
A method that works for google
Name:
DJ Entwine
Date:
10/10/2006 4:22:44 PM
Comment:
Dim Email As New System.Net.Mail.MailMessage("from@gmail.com", "to@gmail.com")
With Email .Subject = "Your subject text" .Body = "Your body text" End With
Dim basicAuthenticationInfo As New System.Net.NetworkCredential("YourGmailGccount@gmail.com", "YourGmailAccountPassword")
Dim mailClient As New System.Net.Mail.SmtpClient() With mailClient .Host = "smtp.googlemail.com" .Port = 587 .UseDefaultCredentials = False .Credentials = basicAuthenticationInfo .EnableSsl = True .Send(Email) End With
|
Title:
I
Name:
Query
Date:
9/25/2006 2:04:55 AM
Comment:
I get this 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 w66sm2217730pyw
Can anybody help me out what is wrong with following code
protected void btnSendEmail_Click(object sender, EventArgs e) { System.Net.Mail.MailMessage MyMailMessage = new System.Net.Mail.MailMessage("mymail@gmail.com","anymail@i-link.co.in", "This is the mail subject", "Just wanted to say Hello"); MyMailMessage.IsBodyHtml = false;
System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential("mymail", "mypass");
System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient("smtp.gmail.com",587);
mailClient.UseDefaultCredentials = false;
mailClient.Credentials = mailAuthentication; //mailClient.Credentials = CredentialCache.DefaultNetworkCredentials;
//mailClient.Credentials = mailAuthentication;
mailClient.Send(MyMailMessage); }
|
Title:
no ssl in mailsetting smtp?
Name:
ryanDev
Date:
9/6/2006 5:24:49 PM
Comment:
I'm having the same problem. Sure I can make a SendMail class which uses the EnableSSl method, but how do you set up the mailsetting->smtp in web.config to use the SSL?
How can I use the MailDefinition functions in controls. Such as sending registration confirmation emails with the CreateUserWizard?
|
Title:
Not working
Name:
Mr X
Date:
9/5/2006 3:31:04 AM
Comment:
They said it all!
Same problem with gmail
|
Title:
problem: smtpclient ssl
Name:
JJ
Date:
8/31/2006 1:55:04 AM
Comment:
I've the same problem with gmail. I store mail-content into a database and then i want to send it with smtpclient()
Source: --------
Dim smtp As New SmtpClient() smtp.Host = ds.tables(0).rows(0)("smtp_server") smtp.Port = ds.tables(0).rows(0)("port") smtp.EnableSsl = true smtp.UseDefaultCredentials = False smtp.DeliveryMethod = SmtpDeliveryMethod.Network smtp.Credentials = New NetworkCredential(ds.tables(0).rows(0)("login"),ds.tables(0).rows(0)("passwd")) Smtp.Send(msgMail)
|
Title:
Doesnt work
Name:
Scott Forsyth
Date:
8/21/2006 9:31:30 AM
Comment:
Hi Jeff,
That suggests that your SMTP server requires a secure connection. You can force that using: mailClient.EnableSsl = True
Scott
|
Title:
Doesnt work
Name:
Jeff
Date:
8/21/2006 9:20:25 AM
Comment:
This code doesnt work with any of the email providers that i have tried that need authentication. I especially want this authentication to work with gmail. The error message i get is "System.Net.Mail.SmtpException: 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 h15sm4738093wxd"
|
Title:
Does not work with my ISP
Name:
Scott
Date:
8/20/2006 4:09:11 PM
Comment:
These settings are not authenticating for me. The error says: Service not available, closing transmission channel. The server response was: Sorry, you must log in before using this server. 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.Mail.SmtpException: Service not available, closing transmission channel. The server response was: Sorry, you must log in before using this server.
Source Error:
Line 22: mailClient.UseDefaultCredentials = False Line 23: mailClient.Credentials = basicAuthenticationInfo Line 24: mailClient.Send(Email) Line 25: Line 26: End Sub
|
Title:
not working
Name:
zjs
Date:
7/9/2006 4:58:34 AM
Comment:
Even when i use NetworkCredential("username", "password") and try this on not only one smtp server, connection throw same error: that domain isn´t in my list of allowed rcpthosts (#5.7.1). It seems that SmtpClient does not use Credentails. Why?
|
Title:
MR.
Name:
Scott
Date:
6/29/2006 9:09:17 PM
Comment:
I have tried the code you have at the top, but I get This transmission has been terminated, you need to log in to use this service.
|
Title:
Paris
Name:
Sample config file
Date:
6/2/2006 4:25:57 PM
Comment:
It seems I cannot post samples with tags here. In the following example, replace { and } by the equivalent tag brackets. Then this will be a simple sample of a web.config initializing your authenticated emails {configuration} {system.web} {!-- your other settings here --} {/system.web} {system.net} {mailSettings}{smtp} {network host="smtp.muhost.com" password="myPassword" userName="myUserName" port="25" defaultCredentials="false" /} {/smtp}{/mailSettings} {/system.net} {/configuration}
}}}
|
Title:
Alternate method
Name:
Paris
Date:
6/2/2006 4:22:18 PM
Comment:
This article is great!! However, one can achieve the same results by hardcoding the authentication details in the web.config file, in the system.net section. Then you can omit all the coding of the host & credentials. They are all loaded from the config from the default constructor. Just do: Dim mailClient As New System.Net.Mail.SmtpClient() mailClient.Send(Email) and the mail will be sent
|