Click here to Skip to main content
15,887,267 members
Everything / Mail

Mail

mail

Great Reads

by Shuqian Ying
The source code and a simple demo program for a plug-in in Microsoft Managed Extensibility Framework (MEF) that provides visual display of email messages.
by cogi83
A SW to send your WAN IP and other info via email
by Jason Sultana
Common practice that I employ in test projects - re-usable mocks
by Tibor Blazko
Sending and receiving emails in cloud Functions

Latest Articles

by Jason Sultana
Common practice that I employ in test projects - re-usable mocks
by Tibor Blazko
Sending and receiving emails in cloud Functions
by Bipin Paul
Implementation of Contact Us Page using ASP.NET MVC pattern
by cogi83
A SW to send your WAN IP and other info via email

All Articles

Sort by Updated

Mail 

8 Feb 2024 by Dave Kreskowiak
Yes, Outlook considers the signature as part of the email body. It's just something that gets pre-populated on a new email. If you specify the signature in a mailto link, Outlook will skip adding the signature to the email and replace the body...
8 Feb 2024 by Joan M
Hello all, INTRODUCTION (jump to the question if you want) Every month I end up navigating through the sent mails to find the last mail I sent to that specific customer, then copy the contents, create a new mail, paste the contents, copy the...
6 Feb 2024 by Member 13265435
Hi, why to send email italian PEC with asp.net? With my code it doesn't send emails thanks Best regards Salvo What I have tried: Dim myMail As New MailMessage() Dim fromEmail As String = "emailpec" Dim toEmail As...
6 Feb 2024 by Dave Kreskowiak
You might also want to check the name of the SMTP server. You have to use a fully qualified DNS name for the server, which is most definitely NOT "smtppec". You can get the correct name from the documentation of whatever mail service or ISP...
6 Feb 2024 by OriginalGriff
The most likely reason is simply that emailpec is not a valid email address, which is always of the form username@domain Without a valid to and from email address, nothing is going to happen. I'd also check your password, and your protocol type...
5 Aug 2023 by Jason Sultana
Common practice that I employ in test projects - re-usable mocks
7 Mar 2023 by Gcobani Mkontwana
Hi Team I have two files, one is for application for a loan and second is attaching pdf from the form and sends it as pdf. But the problem now i am getting both email gets sends and dont want that. What i am trying is as soon app.php loads data...
6 Mar 2023 by Gcobani Mkontwana
Hi Team I need some help, i opened up my cmd and run this command on the terminal and executed fine composer require phpmailer/phpmailer. The went to the subdirectory to copied these files over to the server(c-panel). Now the server is...
9 Jan 2023 by Member 10901644
When i try to send email from my local hosting it works fin but when i try to send email from godaddy plesk hosting account it shows me error "failure sending mail""System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server --->...
5 Dec 2022 by Member 15418280
we are getting prompt window every time when we are sending mail this email can not send without a label how can restrict this pop up not to come what setting we need to do What I have tried: how can be disable popup this email can not send...
28 Nov 2022 by mayrasof
You have to enable the 2 factor authentication on your email account, then create an app password and use this password in your program. Check this link "Using app passwords with apps that don't support two-step verification".
13 Oct 2022 by Member 15796535
Deprecation of Basic authentication in Exchange Online | Microsoft Learn[^]
11 Aug 2022 by TheRealSteveJudge
It is recommended to use the newer System.Net.Mail.MailMessage class. MailMessage Class (System.Net.Mail) | Microsoft Docs[^] Then you must place a using statement on top of your code. using System.Net.Mail; This here is also worth reading:...
11 Aug 2022 by Manojkumar-dll
i tries the below code but it shows a error while compiling Severity Code Description Project File Line Suppression State Error CS0104 'MailMessage' is an ambiguous reference between 'System.Net.Mail.MailMessage' and...
24 Jul 2022 by Petr Barabáš
I'm trying to read an email from my mailbox using the MailKit library. Unfortunately the program throws this MailKit.Security.AuthenticationException: 'LOGIN failed.' The credentials match (I tried to log in through the browser) I'm trying to...
20 May 2022 by sevketkarayilan
I bought a code project account years ago, but I did not confirm. I have never changed my email. how can i confirm my mail now What I have tried: I entered my user information, but I could not find the confirm your e-mail section.
20 May 2022 by OriginalGriff
You need to talk to the staff directly, rather than ask in a general forum like QA. Try asking again here: Bugs and Suggestions[^] and they will help you out.
18 Apr 2022 by Makreel
I have a problem with my email adress XXXX@X.XX so I want to change it to XXXX@X.XX in order to receive your e-mails. So how can I change the e-mail adress where I recieve your mails? Kind regards What I have tried: No problem anymore, Issue...
1 Apr 2022 by Member 11677920
For 10 years I've used same code - very similar to that which follows. All of a sudden I'm getting an error: "Mailbox Unavailable 5.5.1 Authentication required". Using VB.net, my code: Imports System Imports System.IO Imports System.Net.Mail ...
1 Apr 2022 by CHill60
This is the Quick Answers forum. If you want to give feedback you could use one of these options Email : webmaster@codeproject.com Post something in the The Lounge[^] or better in Bugs and Suggestions[^]
21 Mar 2022 by Richard MacCutchan
You can change it yourself, just go to Your Settings[^].
21 Mar 2022 by CHill60
I suggest posting this in Bugs and Suggestions[^] rather than in the Quick Answers coding forum. The Bugs & Sugs forum is actively monitored by the site admin, whereas this one is not
7 Dec 2021 by scriptonizing
Thanks and sorry for posting this at the wrong place. I will repost at Bugs and Suggestions.
6 Dec 2021 by OriginalGriff
You need to talk to the admins, not general users. Posting here doesn't guarantee they see it, but asking here will: Bugs and Suggestions[^]
29 Oct 2021 by trancariciu x
Who's the author behind CodeProject's mailouts to subscribers? What I have tried: Who's the author?He's hilarious.
29 Oct 2021 by OriginalGriff
Kent Sharkey - Professional Profile[^]
17 Aug 2021 by Devendra Sarang
I am trying send an email from vb.net code using smtp. When i am trying to send an email to any "gmail" account, it is sending successfully. but when i am trying to send an email to yahoo account, e.g "account.ymail.com" then unable to receive...
17 Aug 2021 by Richard Deeming
The fact that no exception is being thrown means that the message is being accepted by your mail.client.com server for delivery. If it's not arriving, and it's not in the "junk" or "spam" folders, then you need to dig into the SMTP logs to find...
28 Jun 2021 by MichaelEriksen
I want to sign my emails - generated by a MailMessage class - with a DKIM signature from MimeKit - but got the error "Private key not found." in the line " DkimSigner signer = new DkimSigner(stream, "my-site.dk", "dkim") " And I don't know why...
28 Jun 2021 by Richard Deeming
You've checked that the file exists, but the error message says that the file does not contain a private key. A PEM file[^] can contain a private key, a public key, or both. If it doesn't contain a private key, then you cannot use it to sign...
7 Jun 2021 by Member 12349103
I want to save the image name from textboxes using microsoft.office.interop.outlook. I can save the textboxes to the subject line but I need the same name as the image. First it is a .png then converts to a .pdf. Any tips appreciated. I get error...
7 Jun 2021 by Richard Deeming
Quote: I get error if I remove $ then the name is "{txt_CHKR.Text} {txt_PN.Text} {label67.Text}.png" That's to be expected. With the $ prefix, you have an interpolated string; anything enclosed in {...} braces will be treated as code, and...
2 Jun 2021 by RAHUL(10217975)
I got a mailbox Application@mycompany.com from my office that will receive emails from various customers. My application (deployed in windows server) will read all emails and save attachments. Do I need to configure outlook in windows server? ...
2 Jun 2021 by Richard Deeming
For C# code, I would recommend using MailKit: GitHub - jstedfast/MailKit: A cross-platform .NET library for IMAP, POP3, and SMTP.[^]
2 Jun 2021 by Richard MacCutchan
Quote: Do I need to configure outlook in windows server? Only if you want to use it to read the emails. If you are doing it straight from code then your program needs to talk direct to the mail server. Google finds many samples that explain what...
15 Apr 2021 by narendra_patil
Hello All, I am sending mails through SQL SendMail Jobs relayed through SMTP server. Recipients are in "To" as well as "CC". However, the SQL server is capturing the status as "Sent" for the invalid domain names as well. 1. If the domain names...
15 Apr 2021 by Richard Deeming
For invalid domains, you would only get a delivery failure if SQL Server was sending email directly. Since it's configured to send via your SMTP server, all it can know is that your SMTP server has accepted the message for delivery. At some later...
24 Feb 2021 by W Balboos, GHB
OUtlook mail, and any other mail utility, is not a browser. They do not necessarily render all HTML, and more so, CSS. That being said, you also need to check browser settings to make sure the email was marked as HTML vs RTF vs plaintext. ...
24 Feb 2021 by Madhur Bakliwal
I tried to remove horizonal line from hr tag with below code.The same is working fine in Chrome,but not working in Outlook mail. What I have tried:
9 Dec 2020 by Demetri K.2
php artisan make:mail WhateverName Gives this error: UnexpectedValueException Invalid route action: []. at C:\Program Files (x86)\Ampps\www\instaclone\vendor\laravel\framework\src\Illuminate\Routing\RouteAction.php:92 88▕ ...
29 Oct 2020 by Member 14978731
I'm trying to write a program that will download my emails and save them as PDF. I've encountered a problem with encoding. I'm using the email and imaplib modules. When I use this method to write the file: part.get_payload(decode=True) I get an...
16 Sep 2020 by Member 14683862
Thank you, - This comment has been around for several months ... - Which webmaster should I ask for? From the server where the email is located?
16 Sep 2020 by Member 14683862
Hi, I did some testing by sending an email and after a few times (probably exaggerated) I started getting the following message- "Transaction failed. The server response was: The IP address of the sender (******) was found in a DNS blacklist...
16 Sep 2020 by Patrice T
Quote: How do I get off the dns blacklist? This not a programming problem, it is a behavior (yours) problem, and you have been black listed for some time. - You can wait until removed from blacklist. - You can apologize to webmaster and ask...
12 Aug 2020 by Member 7510036
Newsletter Subscriptions[^]
6 Aug 2020 by Amanda_C
I get an "undefined index error" each time i try to upload documents. I am looking to upload multiple documents through a form and submit it to sengrid as an attachment. This is my code snippet below " $file_parts =...
5 Aug 2020 by Sandeep Mewara
You need to understand what this error means to solve for it. Here: Notice: Undefined Index error in PHP[^] Quote: While working in PHP, you will come across two methods called $_POST and $_GET. These methods are used for obtaining values from...
7 Jun 2020 by Richard Deeming
As discussed in the comments, it's better to open the connection, process the new messages, and close the connection each time, rather than trying to keep a single connection open for many hours.
7 Jun 2020 by Haifovchanin
I am writing an application that processes user emails. On start the application connects to Gmail and then once per minute checks for new emails. After approximately 12 - 20 hours the application stops processing new emails. Using logs I found,...
30 May 2020 by RickZeeland
See the answers here: failure sending mail[^] As you seem to use an old version of the .NET framework this could also cause problems with SSL, the simplest solution is to upgrade to the newest version.
30 May 2020 by Member 11774405
hi developers!! Recently I am working on sending mail by c# coding and I tryed to send mail by c# coding on visual studio platform and it's work totally fine in my localhost of visual studio. but when I run that same code over other hosting...
17 May 2020 by Dave Kreskowiak
I hate to break it to you but you cannot run any code in an HTML email. It would be a huge security risk.
17 May 2020 by Cody O'Meara
I am trying to send an email with PHPMailer. When the email sends it doesn't display the table but part of the code. This is how the email comes in as text setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $conn->prepare("SELECT...
28 Oct 2019 by ormonds
My config file is set correctly, with no mention of localhost, and yet when I send an email I get:- mail(): Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini The relevant part of php.ini is: [mail function] ; For Win32 only. smtp =...
28 Oct 2019 by Richard MacCutchan
The documentation (PHP: Runtime Configuration - Manual[^]) and the error message, both show "SMTP" in upper case.
28 Aug 2019 by Jassim Rahma
Hi, I am sending email using MailMessage and setting google font for the email but the email is sent without the assigned font. Here is my body: How can i fix this please? Thanks, [^]Jassim What I have tried: body.AppendLine(""); body.AppendLine("
28 Aug 2019 by Gerry Schmitz
If the "receiver" does not have the font installed on their machine, another font from the same "font family" is substituted by the "system". Fonts are "files" and do not get downloaded automatically.
24 Aug 2019 by Yunus Bulduk
Hey How do I send comfirm mail together html page ? I use Identity smtp mail sender . But I can't send to mail with my html template page. Thanks for help This code : What I have tried: public async Task Register(RegisterViewModel model) { if...
24 Aug 2019 by Afzaal Ahmad Zeeshan
First of all, you are using IdentityMessage, instead of a MailMessage. IdentityMessage Class (Microsoft.AspNet.Identity) | Microsoft Docs[^] MailMessage Class (System.Net.Mail) | Microsoft Docs[^] There was option with MailMessage to send HTML content, and have it processed and delivered with...
16 Jul 2019 by simple world
Hello. I have a contact form in my website (the website is online) and i also have a php file that handles the POST of the form. Everything works great i even get a success message but the problem is that i dont receive an email in my server. I have tried google, outlook and the email that my...
16 Jul 2019 by Member 14532037
check your mail configuration. if your mail in you set the 2-3 step verification then not allow to send the mail.
16 Jul 2019 by Member 14532037
check your mail configuration.t if your mail in you set the 2-3 step verification then not allow to send the mail.
16 May 2019 by jerryr4
I was looking for a particular article in a recent issue, but only found the mailouts which I hadn't deleted yet Jerry What I have tried: Looked around the CodeProject site
16 May 2019 by OriginalGriff
The Insider Daily is a summary of the items that have appeared in the The Insider News[^] forum - so every item you have received (along with comments on it) will be stored in that forum in descending date order. There is a forum search box on that page if you are looking for a specific item or...
28 Feb 2019 by Member 14119835
I search everywhere but i can't get any solution how to add tag via mailchimp manager. i download mailchimp manager dll from nuget packege.Please anyone help me. What I have tried: I search everywhere but i can't get any solution how to add tag via mailchimp manager. i download mailchimp...
27 Feb 2019 by OriginalGriff
Talk to the people who created it: Marketing Platform for Small Businesses[^] They will know their product a lot better than us, and should provide tech support.
30 Oct 2018 by Ram R
Since you say capactiy error while posting to azure queue. If you are using Queue Storage, then the maximum limit on a message is 64KB unless you enable Blob Storage.
30 Oct 2018 by Ravi Sargam
I have a class where i pass mailmessage object with json serialser like JsonConvert.SerializeObject(mailmessage); The problem is if i add attachment to mail object i am getting error at JsonConvert else it is working fine, can anyone help me how to convert mail object with attachment into...
8 Oct 2018 by Jayanta Modak
showing Error "Failure sending mail." please help me i used port 587 because maximum example 587 used this port how i can know the my mail port or it is right error in this line SMTP.Send(Mail) massage is:- Just "Failure sending mail." What I have tried: Imports System.Net.Mail Public...
26 Sep 2018 by Member 13531690
The email is large amount of data with 5 to 6 pages , with bullets and headings and tables. Except headings , data is randomly generating from .NEt application . Could someone suggest which .NEt class supports accepting large data as body parameter. What I have tried: I have tried with ...
26 Sep 2018 by Member 13531690
I am following below my solution, My company firewall is restricting sending emails from .NEt application, all SMTP server settings have been configured in SQL server. So i am using msdb.Sp_dbmail. And i am sending mail body in HTML format. Below code works good. SqlConnection...
24 Sep 2018 by MadMyche
System.Net.Mail is the namespace for sending email. The email itself is contained within the MailMessage class. The body of an email is of type string. The length of a string is of type int, of which the max value of 2,147,483,647 The ambiguous term "page" equates to approximately 500 words or...
24 Sep 2018 by ZurdoDev
Sending emails via C# is very simple. See this link for an example: How to send email from C#[^] The System.Net namespace is what you need.
20 Mar 2018 by Jochen Arndt
According to PidTagDeferredDeliveryTime Canonical Property[^]: MAPI does not perform the deferred delivery; it is an option of the underlying messaging system to handle deferred delivery. you would have to find out which "messaging system" is used by Outlook and if that is also used by Net.Mail....
20 Mar 2018 by dnibbo
Hi All Using Outlook.MailItem you can set a DeferredDeliveryTime to send at a certain date/time in the future. Does anyone know how to do this using Net.Mail.Mailmessage? I am hoping it can be done using the MailMessage.Headers but cant find any documentation on it anywhere. Thanks What I...
15 Mar 2018 by Graeme_Grant
The question is made up of many moving parts. Break it down into its individual units to make it easier for you to work with: 1. Service layer: * sending mail - MS internal API or using 3rd party library; write code to send an email as a contained service * data from MS Excel - use MS Interop,...
15 Mar 2018 by Member 13721474
wpf application for sending mail from datagrid values which is fetched from the excel What I have tried: i tried upto fetching excel data .i need to send mail for selected row in datagrid
23 Feb 2018 by Member 13692973
i have used phpmailer autoload but when form submitted its redirect perfectly on thank you page but i did not get any mail. i have tried below code: What I have tried: MY Code:
19 Jan 2018 by Samira Radwan
Hi All, I'm trying to send an email using SQL dbmail which works very well for me. When trying to attach file from fileUpload control in aspx page it gives an error as the file is invalid. Please advise what should be done to send uploaded file as attachment using dbmail. I know using...
19 Jan 2018 by ZurdoDev
Refer to the documentation, sp_send_dbmail (Transact-SQL) | Microsoft Docs[^]. It reads: Quote: [ @file_attachments= ] 'file_attachments' Is a semicolon-delimited list of file names to attach to the e-mail message. Files in the list must be specified as absolute paths. The attachments list is...
9 Jan 2018 by dravoss
I am using phpmailer for sending emails, but I want to make a custom header for my compaign, by adding a textarea field that contain any custom header here is my code but i dont know where is the problem it not working i dont see my custom header in mail full header : $headers = []; ...
4 Dec 2017 by Dev O'Connor
Evening i am trying to automate a service status email from a select number of services. when i run the script with sh -x ./myscriptname.sh it works absolutely fine. But when installed as a cron, i get a constant error service: command not found The shell script is as follows: #!/bin/sh...
4 Dec 2017 by Peter_in_2780
It can't find service on the path, which appears to be /usr/bin:/bin from the email. I don't know what distro you are using, but my Ubuntu 16.04LTS has it at /usr/sbin/service Use which service to find it and adjust your script accordingly.
2 Dec 2017 by OriginalGriff
Start here: Gmail API Overview  |  Gmail API  |  Google Developers[^]
13 Nov 2017 by Kaj Lao
Can you send mail from your mail to someone else using HTML? What I have tried: Research, but I can't find what I'm looking for.
13 Nov 2017 by Afzaal Ahmad Zeeshan
You did not find anything, because you cannot send an email with HTML, HTML is merely a markup language and has nothing to do with any sort of processing. You can use any server-side programming framework to send an email, or even a language such as C++/C# or Java. This topic has been covered...
1 Jul 2017 by Tibor Blazko
Sending and receiving emails in cloud Functions
16 Jun 2017 by Member 13044111
I have Integrated Email in C# and Mail is Received In spam In gmail how can i resolve It .using go daddy What I have tried: public static string sendemail(string To, string message, string subject) { try { MailMessage mail = new MailMessage(); ...
16 Jun 2017 by OriginalGriff
Simple: don't send mail that looks like spam. Spam filters are pretty complex these days, and work by looking at the content of the message and determining if it's likely to be a genuine mail, or unsolicited advertising. (They also look at the source, subject, and suchlike, and use complicated...
10 May 2017 by Member 12140172
im trying to read email from exchange server using the below script : but im getting this error : DTD is prohibited in this XML document. i try this solution : XmlReaderSettings xrs = new XmlReaderSettings(); xrs.ProhibitDtd = false; but error stil there . What I have tried: ...
4 May 2017 by Hitesh Chavada
How to use two step authentication (Gmail) during sending mail in C# win form What I have tried: Try this solution security - SmtpClient in C# using smtp.Gmail.com:857 with Google's 2 Step Verification activated - Stack Overflow[^] but it's doesn't work
4 May 2017 by Nirav Prabtani
You need to generate app password from the account which has two step authentication is activated You should generate app password from here Generate App Password.[^] Formore info c# - How do I send an email with Gmail and SmtpClient when the sending account uses two factor authentication?...
2 May 2017 by OriginalGriff
The error message is pretty explicit:An exception of type 'System.IO.FileNotFoundException' occurred in StudentAdmission.dll but was not handled in user code The additional info even tells you exactly which file is missing! Additional information: Could not find file...
22 Apr 2017 by CyberSaint
Hello, EveryBody !! My Problem is I want to receive the data when user fills the contact us a form of my website I want the data to be received through mail. when user click submits button. I don't want to use the local client mailer ... I have HTML website and I can't make functionality with...
22 Apr 2017 by De2
Hi! I have a similar problem for a website, and i found this. But i haven't tried it yet ^^'.
2 Mar 2017 by Gabriel Sas
here is my code:System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.To.Add("test@gmail.com"); message.Subject = "Nici un Clinet valabil pentru reparare"; message.From = new...
2 Mar 2017 by sudeep.a
Goto Account of Gmail , then select Connected apps & sites Allow less secure apps: ON(if this is off you cannot send mails through apps,or your websites )
15 Jan 2017 by Johnny2121
I'm trying to send a mail with the MailMessage & SmtpClient class.However it looks like it doesnt support any proxies what so ever.I've been reading around but I cant seem to find any solutions to my issue.I've tried changing the smtpclient so that it connects through a proxy but that...
15 Jan 2017 by Kornfeld Eliyahu Peter
SmtpClient client = new SmtpClient("124.88.67.17", 82); client.Credentials = new System.Net.NetworkCredential("emailAdress", "password");These two lines should refer to the proxy and not to the SMTP server...