mailkit

get the delivery status of email with mimekit/mailkit library

寵の児 提交于 2021-02-19 04:27:26
问题 I am using @jstedfast Mimekit/Mailkit library, For sending mass email from my app. I want to know how to get the delivery status of each email. This is my first try to get this and after some RnD i got that we have to set or pass report-type=delivery-status some where, but i didn't get any idea where to do that form the doc where i read this. i also try by overriding DeliveryStatusNotification,but got nothing.May be i am going in wrong direction to get the notification/status. protected

My console app shutdown prematurely when using async / await?

痴心易碎 提交于 2021-02-17 07:04:16
问题 I have a console app that all it does is loop through all the customers and send emails to specific ones and then shutdown. I noticed that some of the functions in MailKit’s offer asynchronous so I tried using them instead of non-aysnc and when I did that, it executed the first statement (emailClient.ConnectAsync) on and then I noticed that my console app was shutting down. It didn’t crash. The execution returned to Main() and continued executing after my call to my SendReports() function.

My console app shutdown prematurely when using async / await?

▼魔方 西西 提交于 2021-02-17 07:03:11
问题 I have a console app that all it does is loop through all the customers and send emails to specific ones and then shutdown. I noticed that some of the functions in MailKit’s offer asynchronous so I tried using them instead of non-aysnc and when I did that, it executed the first statement (emailClient.ConnectAsync) on and then I noticed that my console app was shutting down. It didn’t crash. The execution returned to Main() and continued executing after my call to my SendReports() function.

Mailkit imapclient working with console application but not working as windows service

一笑奈何 提交于 2021-02-11 12:35:46
问题 I've created an email notification console application using mailkit's idleClient sample code (https://github.com/jstedfast/MailKit/tree/master/samples/ImapIdle). The purpose of this application is to fetch all new emails and trigger web api's based on the content of the email. It works fine as a console application. But when I converted it into a windows service using Topshelf and hosted it in a server environment, the protocol logger is not able to write anything to the logs and the onCount

Send Generated Pdf as Email Attachment Asp.NetCore

孤者浪人 提交于 2021-01-28 22:07:06
问题 I am using Rotativa to convert my view to pdf. I would like to send that generated pdf as an email attachment (without having to download it first to disk). I've been following a bunch of tutorials to do this but I just keep going round in circles. I would much appreciate any help I can get. public async Task<IActionResult>SomeReport() { ... return new ViewAsPdf (report) } return view(); MemoryStream memoryStream = new MemoryStream(); MimeMessage msg = new MimeMessage(); MailboxAddress from =

Send Generated Pdf as Email Attachment Asp.NetCore

天大地大妈咪最大 提交于 2021-01-28 22:06:35
问题 I am using Rotativa to convert my view to pdf. I would like to send that generated pdf as an email attachment (without having to download it first to disk). I've been following a bunch of tutorials to do this but I just keep going round in circles. I would much appreciate any help I can get. public async Task<IActionResult>SomeReport() { ... return new ViewAsPdf (report) } return view(); MemoryStream memoryStream = new MemoryStream(); MimeMessage msg = new MimeMessage(); MailboxAddress from =

MailKit From Address

£可爱£侵袭症+ 提交于 2021-01-27 12:08:53
问题 Im using mailKit in asp mvc core to collect email from a IMAP mailbox. I return the message using the command var message = inbox.GetMessage(uid) This returns all the results of the message. From here i want to access the sender email address (not including the name). After breakpointing on the above line i can see that the variable message has the following property message -From --From(Array) ---From(item) ----Name (name of the sender) ----Address(email of the sender) When referencing the

Failed to send email from 1and1 (ionos) hosting server using ASP .Net Core and Mailkit

二次信任 提交于 2020-12-15 05:23:31
问题 I have created a simple email service in my .Net Core application, which sends mail messages using provider email. It works just fine on my local machine with port 587. But when I published it to my 1and1 hosting server, it failed to send the email. Here is my little code, how I create client using the Mailkit : using(var client = new SmtpClient()) { client.ServerCertificateValidationCallback = (sender, certificate, certChainType, errors) => true; client.CheckCertificateRevocation = false;

Can I send SMTP email through Office365 shared mailbox?

烂漫一生 提交于 2020-11-24 22:49:02
问题 We are thinking about moving to O365; however, we developed software that uses our current Exchange server to send email both to external users as well as to a support box when errors occur. I've been testing this to ensure that the code we have in place will continue to work with O365 but so far, I have not been very successful. I have tried using .Net's SmtpClient as well as MailKit's SmtpClient and neither one seems to work. I keep getting error (this is the error from MailKit -- the .Net

Can I send SMTP email through Office365 shared mailbox?

自闭症网瘾萝莉.ら 提交于 2020-11-24 22:47:49
问题 We are thinking about moving to O365; however, we developed software that uses our current Exchange server to send email both to external users as well as to a support box when errors occur. I've been testing this to ensure that the code we have in place will continue to work with O365 but so far, I have not been very successful. I have tried using .Net's SmtpClient as well as MailKit's SmtpClient and neither one seems to work. I keep getting error (this is the error from MailKit -- the .Net