Questions tagged [smtpclient]

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

smtpclient
Filter by
Sorted by
Tagged with
11 votes
1 answer
457 views

Changing name of automatic attached file in e-mail

I am using Mailkit library to send e-mails. This is the code to do so: public async Task SendAsync(IdentityMessage message) { if (message == null) return; ...
jstuardo's user avatar
  • 4,299
0 votes
1 answer
284 views

how to determine who sent request to my smtp server: mail-client (such as outlook) or other smtp servers

I am developing smtp server and there is a question i don't understand about smtp handshake. #1. mail client (outlook) -> My SMTP Server EHLO - AUTH - FROM - TO - DATA - QUIT It is smtp relay ...
Engineer Researcher's user avatar
0 votes
1 answer
801 views

Python SMTPLIB remove X-CMAE-Envelope on all messages SMS [duplicate]

I am using SMTPLIB in python for sending sms messages and I wanted to know why some of my messages are sending with a X-CMAE-Envelope: header and how to remove it. I am using this python code for ...
Python 123's user avatar
0 votes
1 answer
1k views

SmtpCommandException: Incorrect authentication data Unknown location AuthenticationException: 535: Incorrect authentication data

The original post was removed and I thought I would revise my latest issue. I understand completely that it has something to do with my username and password but am not sure of what else I can do. I ...
Tyler Crane's user avatar
0 votes
0 answers
60 views

How to set up a SMTP client on Mibew?

I'm currently using Mibew on a website, but I have a problem, I can't make the mailing system work. I already tried typing in the SMTP settings in the files /configs/default_configs.yml mailer: ...
julianx2rl's user avatar
0 votes
1 answer
87 views

The SMTP server requires a secure connection or the client was not authenticated. Error while sending outlook mail using c# webapplication

I'm not sure about which mailServer should be using for microsoft.com mail. This is my code: string toemail = "v-***@microsoft.com"; string subject = "Testing Mail"; string ...
Nikita Bhopale's user avatar
0 votes
0 answers
1k views

Django smtplib.SMTPRecipientsRefused: Recipient address rejected: User unknown in virtual mailbox table

I have a django app that requires users to create an account before they are able to use the service. Upon registration, the user is sent an email with a link to activate their account. Lately however,...
mopi64's user avatar
  • 21
4 votes
1 answer
775 views

Gmail SMTP clien fails on Azure

When I send mail from local it works pretty well, but when I deploy on azure it fails. Error: The SMTP server requires a secure connection or the client was not authenticated. The server response was: ...
Saba Shavidze's user avatar
2 votes
0 answers
176 views

email sender c# code not working in asp.net mvc web app

I am using 'System.Net.Mail.SmtpClient' to send email notifications from my ASP.Net C# MVC web project using OFFICE365 EMAIL ID as Sender. It was working correctly a few months back but stop working ...
Jitendra Kumar's user avatar
14 votes
1 answer
35k views

Enabling TLS 1.2 without changing code in .NET

I have .NET 4.5.2 application that is using SmtpClient to send emails. The application is installed on Windows 2012 R2 server. When I disable TLS 1 and TLS 1.1 and enable only TLS 1.2, the application ...
LP13's user avatar
  • 32.4k
0 votes
0 answers
525 views

How to forward an e-mail using the SmtpClient?

I'm doing a WebForm where the user can forward a selected e-mail. This is the method I'm using: public bool SendEmail() { SmtpClient smtpServer = new SmtpClient("host"); ...
Wanderer's user avatar
0 votes
1 answer
1k views

Smtp Client C# Problem with Aruba PEC and with attachment

this is my code: try { SmtpClient client = new SmtpClient("smtp.aruba.it", 25); client.EnableSsl = true; client.Timeout = 10000; ...
Luca Porfido's user avatar
1 vote
1 answer
430 views

s/mime signed message cannot be open by outlook

I need to digitally sign email using s/mime. I've created a detached signature for my attachment but outlook can't open it: "Cannot open this item. Your Digital ID name cannot be found by the ...
Andrey's user avatar
  • 65
0 votes
0 answers
697 views

Is there any way to send email to users with attachment using SharePoint/office 365?

I have created a PowerShell script to send email with attachment getting the below error. Is there another way or how to resolve the below issue ? Error: Exception: Exception calling "Send" ...
Nanda's user avatar
  • 59
1 vote
0 answers
1k views

How can i get System.Net.Mail.Smtp work on linux enviroment?

So, i'm developing an Web API on .NET Core 3.1 that should run on a linux server (CentOS 8) and i need to send transactional e-mails from it. But the first time i ran the app, when i my API tries to ...
MestreDosMagros's user avatar
0 votes
1 answer
550 views

Email link in controller

I'm implementing a Confirmation after registering system, and the code is working fine, there's a small problem. The problem is that user must click on link but this is how it appears on the below ...
Jpi Champ's user avatar
0 votes
0 answers
102 views

ASP.NET VB Code Behind - Error The server response was: 5.7.1 Client was not authenticated

I have some ASP.NET code that I need to send an email this is the procedure I have cribbed on how to do that and it tries to send the email but after a fairly long pause comes up with this full error ...
Siv's user avatar
  • 123
0 votes
1 answer
178 views

SmtpClient in c# resource is inaccessible due to its protection level

The following C# source code shows how to send an email from my email address using SmtpClient. protected void btnFinal_Click(object sender, EventArgs e) { SmtpClient smtpClient = new SmtpClient(&...
user avatar
0 votes
1 answer
229 views

Is SmtpClient.SendAsync() really faster than SmtpClient.Send()

I was refactoring some of my code into a service and I was going to roll async all the way through down to my EmailService's Send() method. I was about to replace Send() with SendAsync() and noticed ...
Sam's user avatar
  • 5,157
1 vote
1 answer
308 views

Drop email send into different folder

I have a mail box where all support emails come through to the default location "Inbox", we recently added in some new programs with automatically run every day. We've set them so when they ...
Jessica's user avatar
  • 115
1 vote
1 answer
2k views

Enabling Exchange Online SMTP Client Authentication with Powershell

I'm trying to enable Authenticated SMTP in Exchange Online via PowerShell. I was semi successful with my attempts. $Users = Get-CASMailbox -ResultSize unlimited $Users | where {$_....
admin.void's user avatar
0 votes
1 answer
968 views

How to send invitation to google calender from gmail in ASP.NET MVC 5?

I have already written a code in C# to send a mail to the user from my gmail and also sending a attachment if it contains. Now I need to send the invitation so that it marks on customer google ...
Biraz Dahal's user avatar
0 votes
1 answer
391 views

Sending an Email using SMTP client

I am trying to send an email using SMTP client using my gmail credential. This is the code am using using (var mail = GetMailInfo()) { using (SmtpClient client = new ...
N.J's user avatar
  • 1,210
0 votes
0 answers
136 views

SMTPClient - Error while sending mail - Connection attempt failed

I am using below code to send mails, it works for Gmail SMTP & also some other SMTPs. SmtpClient smtp = new SmtpClient { Host = data.SMTPServer, ...
Brain Power's user avatar
0 votes
0 answers
158 views

The SMTP server requires a secure connection or the client was not authenticated [BYAPR21CA0017.namprd21.prod.outlook.com]

I am getting this error message when I try to send mail. The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not ...
Abhishek Pandey's user avatar
0 votes
1 answer
895 views

SMTP Mail sending Server Name different from the Sender Email

I am stuck in a case where SMTP Server is with different name & the sender email has a different name. SMTP Server :- mail.in.xyz.com Sender :- [email protected] You can note here that Server is ...
Anup's user avatar
  • 9,582
1 vote
0 answers
122 views

Break apart email attachment if zip is too big to email

So I can send up to 25MB in an email attachment. I am looking for away to check how big the file size is and if its too big break it apart and send in two emails. (Or if there is a better way to do it)...
ProgrammingIsLife's user avatar
0 votes
2 answers
630 views

Email attachment is being sent as a file instead of a zip file

So I am trying to attach a zip file of pdfs to an email and it comes in as a file not as a zip. I can open it in notepad but its just a bunch of random characters. Here is my method to send the email: ...
ProgrammingIsLife's user avatar
-1 votes
1 answer
136 views

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 ...
ProgrammingIsLife's user avatar
0 votes
0 answers
255 views

Sending email with attachment of zip folder not attaching the zip folder

I am trying to attach a zip file after downloading files from the server and then sending them in an email. Here is where i am downloading the files: else if (radio[0] == "Email Statements") ...
ProgrammingIsLife's user avatar
0 votes
1 answer
411 views

C# How to identify unknown user email address in SmtpClient.Send()

I am using the following code to send emails internally at my company on our own relay server: using (MailMessage em = new MailMessage()) { em.From = new MailAddress("[email protected]&...
KWallace's user avatar
  • 634
0 votes
1 answer
205 views

SmtpClient exception not stepping into SmtpFailedRecipientsException

I am trying to show an error message for failed recipients in my asp.net webpage. For some reason the code is not stepping into the SmtpFailedRecipientException: SmtpClient client = new SmtpClient(&...
raven_977's user avatar
  • 475
1 vote
0 answers
558 views

Using SmtpClient.Send with attachment locks file, even after implementing Dispose()

This is my first time asking a question on StackOverflow, so let me know if you need more clarification. I am attempting to send emails with an attachment to users of a system, however I am having ...
Agbullet's user avatar
1 vote
1 answer
297 views

Cannot send email using SmtpClient in ASP.NET

I want to send email in ASP.NET MVC website but it doesn't work. I think the problem is with this exception here 'client.ServicePoint.Address' threw an exception of type 'System.NotSupportedException' ...
tomography's user avatar
0 votes
0 answers
69 views

Qt Linux Mint 19.2 QSslSocket

I developed small Qt App for sending mails over smtp 465 port. It works on my developer linux mint 19.2 machine. When I deploy the app with all the libs to Mint 17.3 machine I get QAbstractSocketError:...
Tom's user avatar
  • 21
0 votes
0 answers
327 views

fail send smtp e-mail to the user with error: Failure sending mail

I created a registration form in the asp.net and everything is working fine, then, I added the following code to be able to send an email to the user and the host, it is still working but I didn't ...
Mariam's user avatar
  • 9
1 vote
2 answers
2k views

SMTP send multiple mail by adding multiple to vs Async method

Question : I have a list of 50~100 person i need send email to, MailMessage allows me to add a list of To(MailAddressCollection) and just smtpClient.Send(mail) or the Async method ? What is the best ...
thanhnguyen.1701's user avatar
0 votes
0 answers
1k views

vb,net - sending mail using net.mail and office 365

I have a sendmail function i've used plenty of times before, only I've come to use it today using an office 365 account and its not working. Code is as follows... Public Function Sendmail(ByVal ...
John's user avatar
  • 775
2 votes
2 answers
2k views

Unable to send emails using C# code from GoDaddy configured Office 365 account

I have purchased "Office 365 Email Essentials" plan from GoDaddy for sending the emails. I am able to send and receive these emails in my outlook mailbox, but not programatically via C# code....
DfrDkn's user avatar
  • 1,310
0 votes
2 answers
1k views

Getting error : The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP

I have a C# console application for sending mails over Outlook. But it is throwing an error "The SMTP server requires a secure connection or the client was not authenticated. The server response was: ...
Rupali's user avatar
  • 35
0 votes
0 answers
317 views

Asynchronously sending Emails in VB.net?

Public Async Function SendEmail(ByVal EmailToIds As String, ByVal Subject As String, ByVal Message As String, Optional ByVal EmailCcIds As String = "", Optional ByVal MailAttachment As String = "", ...
AAnchal Singh's user avatar
4 votes
1 answer
244 views

Added Schema.org markup to email, won't affect inbox of gmail, neither in mobile app nor web app

I can send email using C# and System.Net.Mail.SmtpClient and use Gmail as my smtp server. Now I want to add schema markups to my emails. And I expect to see them affect how an email is shown in Google ...
Shahryar Saljoughi's user avatar
0 votes
2 answers
250 views

Can we place JavaScript Code along c# in .NetCore WebApi

I have a method in my asp.net Core web Api that has for role sending Emails , using SmtpClient. the Body of the message is this html string: @"<html> <head> <...
A.HADDAD's user avatar
  • 1,868
0 votes
0 answers
440 views

Error ,The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP;

Appreciating your help to fix this error , i tried all options mentioned in my case with no result. my code as following , i tried using from [email protected] ,and using user without domain in ...
A.Ali's user avatar
  • 1
2 votes
1 answer
920 views

Delay in sending email in ASP.NET CORE

Hi am building a web application using blazor which sends email activation link to registered users, email activation is is being sent but the problem here it takes too long(approximately 5 minutes) ...
Tega Onogharemor's user avatar
0 votes
1 answer
48 views

How do I send a "secure email"? [duplicate]

I am trying to send an email to someone when they forget their password to their account but every time I try it says "The SMTP server requires a secure connection or the client was not authenticated. ...
OneWetBoy's user avatar
0 votes
0 answers
263 views

Create Task in outlook with SMTP Client

I want to send e-mail task from outlook with smtp client. I have already smtp client but I don't know how can I correlate smtp host and my code. Here is my code: string startWord = "#JSONTASK#"; ...
Resul Bekir Şahin's user avatar
0 votes
2 answers
992 views

Amazon WorkMail timeout .net core SmtpClient

I am trying to send a standard email message through AWS WorkMail using the SmtpClient in .NET Core. The configuration is very standard according to Amazon Documentation: https://docs.amazonaws.cn/...
qubits's user avatar
  • 1,278
0 votes
1 answer
162 views

How to ignore same emails with in 30 seconds with smtp?

smtpClient.Send(mail); on live server when we get exceptions so, we receive continuous same emails, because multiple users hitting that part of buggy code frequently. I want to avoid this situation. ...
Mhd's user avatar
  • 791
4 votes
2 answers
3k views

5.2.0 STOREDRV.Submission.Exception:InvalidRecipientsException

I'm trying to send ics invitation mail to multiple recipients using outlook email id. but I'm getting this error... Transaction failed. The server response was: 5.2.0 STOREDRV.Submission.Exception:...
Shreyas Pednekar's user avatar

1 2 3
4
5
26