Questions tagged [smtpclient]

on .NET Framework , allows applications to send e-mail by using the Simple Mail Transfer Protocol (SMTP)

1275 questions
0
votes
1 answer

Is there a way to do an app-based round-robin rotation of SMTP servers?

I am using the SMTPClient class which uses the following in the app.config
Rafferty
  • 937
  • 1
  • 9
  • 16
0
votes
2 answers

Base64 encoding on the iPhone, works in simulator, breaks on device

I am using the simple SMTP client code, first posted on google code at: http://code.google.com/p/skpsmtpmessage/ That repo seems to have gone unmaintained, as the project owner is now employed at apple, and maybe has better things to do. There is a…
ryan.scott
  • 2,215
  • 2
  • 18
  • 16
0
votes
1 answer

Can i use IP Address as SMTP host rather then smtp.email.com

i am creating an Email sending sample application, and i want to use send email from different email address like "gmail, yahoo, hotmail" so i don't want to use "smtp.email.com" as host, because if i use "smtp.email.com" as host i will have to…
Jonas Gobel
  • 153
  • 3
  • 5
  • 13
0
votes
4 answers

Sending emails that requires a secure connection

REMAKING QUESTION This code doesn't work The error is: The remote certificate is invalid according to the validation procedure. var client = new SmtpClient("smtp.domain.com.br", 25000) { Credentials = new NetworkCredential("username",…
Michel Ayres
  • 5,891
  • 10
  • 63
  • 97
0
votes
6 answers

sending mail works on server but not on my local machine

i have the following code below (i have stuck in xxx to not publish the real name). this code works fine when i upload to the server and will send out emails perfectly. MailMessage msg = new MailMessage(); msg.From = new…
leora
  • 188,729
  • 360
  • 878
  • 1,366
0
votes
1 answer

ASP.NET web.config SMTP security exception when sending e-mail from web site

I'm hosting my ASP.NET site at our ISP. Whenever I want to send an e-mail from my site, I get the following error: System.Security.SecurityException: Request for the permission of type System.Configuration.ConfigurationPermission,…
Deon
  • 203
  • 2
  • 4
  • 15
0
votes
2 answers

How do I prevent MS Exchange users from forwarding or copying a message sent via System.Net.Mail?

How do I prevent MS Exchange users from forwarding or copying a message sent via System.Net.Mail?
0
votes
2 answers

IDisposable and Asynchronous Processing (SmtpClient.SendAsync)

Reviewing the MSDN docs for SmtpClient, I noticed that the example code looks like this: client.SendAsync(message, userState); // More stuff message.Dispose(); The call to SendAsync could take significant time to complete. How is it that message…
Eric J.
  • 147,927
  • 63
  • 340
  • 553
0
votes
1 answer

usage of MailMessage.From in dotnet

SmtpClient smtpClient = new SmtpClient("smtp.gmail.com"); smtpClient.Credentials = new NetworkCredential("xxxxx@gmail.com", "password"); smtpClient.Port = 587; smtpClient.EnableSsl =…
Nageswaran
  • 7,481
  • 14
  • 55
  • 74
0
votes
2 answers

Anybody knows how to send SSL emails with System.Net.Mail through GoDaddy email servers

I researched this on SO and could not find a truly complete answer. Many people, including myself, are able to send an email through C# System.Net.Mail by using port 25 or 587 and NOT using SSL. For example, see…
Damiano Fusco
  • 215
  • 3
  • 6
0
votes
1 answer

what is the mistake? (sending email in asp.net)

I am using this code for sending email in asp.net: Using System.Net.Mail public string SendEmail() { SmtpClient obj = new SmtpClient(); MailMessage Mailmsg = new MailMessage(); Mailmsg.To.Clear(); Recievers = new…
El Ma
  • 35
  • 3
  • 8
0
votes
4 answers

.NET - Mail server doesn't send mail through SmtpClient.Send

I wrote a single console application (just a part of a site code, but it must work apart too, and it has the same fault result as inside the site) (C#): MailMessage message = new MailMessage("login@ourDomenInPunycode", "toMail") { Subject =…
user808128
  • 511
  • 1
  • 7
  • 24
0
votes
1 answer

Independentsoft generated .msg Messages losing attachments when forwarded

I have got an issue that to be honest I initially did not think was a programming issue, but after checking all other areas I would appreciate your feedback if this could possibly be one. We have an ASP.NET web application that sends emails with…
Chris
  • 3,487
  • 3
  • 25
  • 37
0
votes
1 answer

The remote certificate is invalid according to the validation procedure.. for email functionality using asp.net

While working on email functionality using asp.net, I found the following error : Unknown error occurred when sending email: The remote certificate is invalid according to the validation procedure.. at…
santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143
-1
votes
5 answers

Html page to string

I am sending emails to my users in HTML format. There is lots of editing there, like user name, user birthday and many other details. Now, I don't want my code to be look like this: String message = "hello " + "David\n" + "congratulation for your "…
Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216