Questions tagged [smtpclient]

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

1275 questions
-1
votes
2 answers

Why can't i send two mails in a row with c#?

I am sending emails using c# using SmtpClient. I have to send aproximately one hundred different emails per day, and I can't use the same mail (adding several recipients) since the email changes according to the recipient. I am not using a local…
Soph
  • 2,895
  • 5
  • 37
  • 68
-1
votes
2 answers

How to sent the unsent mails

Work on vs2010 ,asp.net C#.Recently I work on smtp server.Using the smtp server I need to send mail, I already successfully done this job . To send mail I use the bellow syntax. public string PostEmail(string mailSubject, string mailBody) { …
shamim
  • 6,640
  • 20
  • 85
  • 151
-1
votes
2 answers

how make invisible the password with Mailkit in Authenticate if the SMTP server requires authentication?

I understand that SmtpClient doesn't support many modern protocols so the recommendation is use MailKit, but with SmtpClient using System.Net.Mail the password was not required. With Mailkit I must Authanticate with password in my code. using (var…
Claudiu
  • 9
  • 3
-1
votes
1 answer

Cannot send mail via SmtpClient after deploying to the server

After starting project in Release mode with Visual Studio my SmtpClient works and it sends an email, but after publishing to the server i see an error. This is my C# code: using (MailMessage mail = new MailMessage()) using…
-1
votes
1 answer

How can I send multiple e-mails with C# smtp client?

I just started with c# and want to write a code for school project a mailer basically I want to send e-mails to all the emails saved in a txt file. class Program { static void Main(string[] args) { var client = new…
-1
votes
2 answers

Possible issue when sending email with SMTP.js

I am using smtp.js to send mails to my email id whose credentials i made using smtp.js.I made a contact form where i want the user to enter his info and email and that should be sent to my email.So according to this logic, my mail should be in To…
Saad Ali
  • 1
  • 2
-1
votes
1 answer

System.ObjectDisposedException while sending email using smtpclient (fluent-email)

I am getting a System.ObjectDisposedException when i try to send an e-mail in a .NET core 6.0 project using the fluent-email library: System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Net.Mail.SmtpClient'. at…
-1
votes
1 answer

SecurityProtocol showing all TLS version for SMTP Client But Server dont have TLS protocol enabled

I am using Office365 SMTPClient to send emails. On the Server machine, I did not find any settings related to TLS enabled or added. I checked through PowerShell command [Net.ServicePointManager]::SecurityProtocol and can see SSL and TLS only. No TLS…
sujayadkar
  • 63
  • 1
  • 13
-1
votes
1 answer

Can I read mail using C++/CLI?

I can send mail using SmtpClient class, but are there any classes that allow reading mails? I tried to find something out, but it wasn't sucsessfull.
k1nd
  • 5
  • 1
-1
votes
2 answers

C#. SMTP The server response was: 5.7.0 Authentication Required

Error: The SMTP server requires a secure connecton or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at. private void SendMail(string email, string firstname) { …
-1
votes
1 answer

Zip File not able to open after attaching to email using dotnetzip library

I am able to save all of my files into a zip file and download them correctly. Now I am needing to use that zip file to attach to an email. I am getting errors saying it can't bee opened and if i open it in notepad they are blank. They are…
-1
votes
1 answer

How to send email to everyone in the table with using SqlDataReader

I am using code for sending email to everyone in the table { table_name(id, email, username) } but this code only send mail to first email in the table. public void Sendmail() { SqlConnection con1 = new…
aekit
  • 405
  • 4
  • 14
-1
votes
1 answer

I can't send an e-mail

I've tried on different ports like 25, 587, I've tried to change the server to localhost and set the UseDefaultCredentials to false, ssl to false. Still doesn't work. It gives me an error : "Email send failure". private void button4_Click(object…
-1
votes
1 answer

Sent email programatically are not store in 'sent items' folder ASP.Net

I'm sending email through asp.net code using godaddy mail server. Mail sent successfully but not store in sent item folder. I am using below code :- SmtpClient client = new SmtpClient(); client.Host = "smtpout.secureserver.net"; client.Port =…
-1
votes
1 answer

SendAsync vs SendMailAsync vs new Thread vs Parallel.ForEach for sending 300-500 emails

TLDR; Which of the following (or otherwise) is most suitable for sending 300-500 emails quickly to an external mail server? SmtpClient.SendAsync SmtpClient.SendMailAsync new Thread Parallel.ForEach I'm amending code for sending emails to now use…
EvilDr
  • 8,943
  • 14
  • 73
  • 133