When user registers in my system (web application), I want to send him an email with verification link so I can verify email address is correct and belongs to the user. Link will be shipped in text/html body version so user can directly click on it and open it in browser.
I just wondering should I fill a text/plain body too? Mimekit documentation mentions "The reason for sending the message text in both formats is that not all mail clients are capable of displaying HTML." but I suppose nowadays all modern mail clients should be able to support this.
I'm using c# and mimekit for sending emails.
My system targets enterprise customers, so some legacy systems should be kept in mind.
Related
Does anybody know if MailKit supports a read receipt (reply message on read)? I have not found anything on the web or on Stackoverflow.
Read receipts (i.e. automated messages being sent when a user opens a message) is not something that MailKit can do automatically, it must be implemented by the software using MailKit or by the mail server.
This feature is something that generally only groupware suites like Microsoft Exchange, Lotus Notes, and Novell Groupwise implement.
It is a feature that can be implemented by the mail server or by the mail client, but it is not a feature of any of the mail protocols and so MailKit does not implement it.
If you would like to support sending read receipts, you will need to automatically create a MimeMessage with a MessageDispositionNotification body part and send it when the user opens/reads a message in your client program.
To request a read receipt for a MimeMessage, you will need to set the Disposition-Notification-To header field like this:
message.Headers[HeaderId.DispositionNotificationTo] = "me#example.com";
If the receiving user agent supports read receipts and it is configured to send them, then you will theoretically receive one when the user reads the message.
For more information about read receipts, see rfc3798.
I need to sync sent mails with the sent folders of mail servers, for the users to see at future moments. I can send mails using all these 3 ways, SMTP, CDO and Microsoft Outlook Object(MOO); out of which I can only see my sent mails with MOO. Now the problem is, Not all clients are using outlook, and thus its more impractical to use this.
Out of exercise, I had also used MAPI to send mails, but that don't send HTML body. Also I looked over this topic Microsoft Sent folder, but that don't solve my problem.
So is there anyway, I can send mail with HTML body and sync the sent mail with Sent Folder. ?
Thanks.
You can do that with Extended MAPI (C++ or Delphi), but you probably mean Simple MAPI.
If you are connecting to an Exchange mailbox, EWS is another option.
I am Creating an application in c# . I have to know how can I know the status of the sended email.The status May be.
4. Track sent emails to determine if they were:
4.1 delivered
4.2 opened
4.3 recipient opt-out
4.4 bounced (with the reason for the bounce)
4.5 time/date sent
4.6 which links in the email were clicked (and time/date they were clicked)
4.7 IP address, if user clicked any links in the email
Should I use Any API or Dll or something else.Please help .Any Help will be Appreciated.
If you program your application to send mail through a hosted SMTP server like http://www.sendgrid.com or http://www.ultrasmtp.com, you can access the delivery status of messages that you've sent.
There is no easy way to do what you want. Actually this status can be tracked by your SMTP server itself and if you are using some third-party SMTP server like GMail or any corporate server, I 'm afraid they won't give you access to those information without using a authenticated client.
From your C# program, if the SmtpClient.Send() method returns true, you can assume the mail has been delivered to the SMTP server. If in case, the delivary fails, you should receive a mail to the outbound mail ID's inbox. If you want to make outbound mails appear in your outbox, you should configure IMAP/POP3 configurations accordingly.
There is no API or DLL available in exact form you want, as far as I know. You can try some other way like tracking a hash or embedded image in the mail-body from your server. But these are not reliable way as most mordern Messaging services have counter-measures for this.
I have a date picker and time picker in my app and I'm trying to send mail as described here which contains the date as well as the time in the body of the mail.
So, Now my question is how to disable the body part of the email as the user shouldn't edit the date or time once it is selected from app.
What's the point of security in this ?
Code:
var mailto = new Uri("mailto:?to=me#mysite.com&subject=Date Selected :+datepicker.value+");
await Windows.System.Launcher.LaunchUriAsync(mailto);
The way you decided to generate the email, you don't have any control over the email client from that point on - you have called an external process and passed your parameters to it. The user could do with that email whatever he wanted or even delete it without sending, without you knowing about it. Also you are depending on the user having the system setup correctly for this link to work.
To keep control over the email you are sending you shouldn't depend on external applications, therefore the solution with sharing won't help you either, even though it's prefered in Windows Store apps over the one you are currently using.
If you really need to have the email sent unchanged, you only have two options:
Use a client side SMTP library for sending emails. The only one I know of for Windows Store apps was released by Limilabs. The downside is that you need to configure your app locally with SMTP server settings.
Send a request to a web service and send the email from there. This is probably the best approach, since it is completely under your own control and doesn't require any additional configuration on the client side.
AFAIK you cant disable the recipient, subject or body of an email.
If you want to detect an edit, then you can add a checksum to the body.
I am sending a mail using SMTP server in C# from my application. Whether the mail is delivered or not to the recipient, i need the response to our application.
How it can be done using C#???
You can not find out whether an email has been delivered, there is no mechanism for this in smtp. The best you can do is know whether the email has been sent successfully, which (presuming you are using System.Net.Mail.SmtpClient) you can tell by the fact that that the Send method throws an exception.
Spammers try to get around this limitation by using HTML mail and putting a link to an image on their server with a unique URL. IF this URL gets hit then you know someone has opened then email. This is somewhat frowned upon and highly unreliable as most email applications block linked images by default.