Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 mail addresses and paste them and copy the subject and paste it too... then finding the list of hours and expenses I will want to bill to my customer and attach it into the new mail... I really hate all this process.

I've added more functionality to a software I programmed for my own use, to keep track of that amount of time and those expenses, and now I can add customer contacts, define what kind of information I will want to send to those contacts... So now, after creating the pre-invoice I have 2 new icons that I can press, the first one is intended to build a mailto link with the right recipients, subject and body.
This works very well, and I get everything in the mail only pressing a button preventing my possible mistakes and keeping a constant mail format for all my customers.

QUESTION
So, after building a mailto string, the signature of the mail disappears as it seems that Outlook considers it to be part of the body.

The easiest way to solve it that I can think of is to copy the contents of the HTML that I can find in the outlook signatures folder and add that to the body string, but it doesn't seem the right way to do it.

Have any of you found a better solution?

Thank you all in advance.

What I have tried:

If I remove the body part of the mailto string the signature remains there.
Have searched the internet and I've seen solutions like using AutoHotkey to add the signature, copying the body contents into the clipboard and once the mail window appears paste them there...

All those things seem :(
Posted

1 solution

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 with that specified in the mailto link.

Oh, and mailto links are a bad idea. Depending on the browser and version used, the maximum length of the mailto link can vary widely, possibly cutting off your email message.

Is there a way around this? Not from your mailto link, no.
 
Share this answer
 
Comments
Joan M 9-Feb-24 1:16am    
Hi Dave, thank you for your post.

Is there any other way to do it?

I'd like to be able to attach the files manually and to check if the results are ok before sending the mail (something that should be ditched after a while) and having the mails sent in my outlook sent folder after sending them (which would be needed to be able to follow up the mails with customers).

That's why I thought the mailto would work for me, but of course I'd love finding a better option.
Richard Deeming 9-Feb-24 5:06am    
Depends how complicated you want to make it. For example, I've used MailKit[^] to display the contents of a shared mailbox in a web portal, and built views to allow users to compose new messages, and reply to or forward existing messages. That gives you complete control over the message that's sent, and lets you store it in either the "sent items" folder or a specific folder of your choosing. But it's not trivial, particularly once you start getting into OAuth2 authentication for IMAP and SMTP servers.
Joan M 9-Feb-24 6:39am    
I've seen the PHPMailer class that maybe could work for my use case if I could select the file to be attached and I could preview the contents in a page before sending (should be easy to prepare a small form) and the mail would appear in my sent folder afterwards... Will try that approach... thanks for the comment!
Dave Kreskowiak 9-Feb-24 18:22pm    
There's no easy way to do this that isn't either complex to setup and code or to just do manually.

I did this a couple years ago at work, where the website is setup with Exchange Online and permissions to impersonate the user using the site. All email operations are done in the site, including manually attachments. The site then saves the entire email "context" in the database and a service comes by once a minute to check for stuff it needs to send. If there is, the service can impersonate the person that sent the email or just use its own account the send emails for stuff like notifications and other site events.
Joan M 10-Feb-24 7:45am    
Yep, seen it's not super easy, but not hard either, just done and it is already working using PHPMailer.
A pity I can't access directly to my local file system due to PHP safety rules, but nothing uploading the file into the server and deleting it back after sending the mail can't handle.
The only issue I can see now is that I can't see the sent mails in my sent folder on outlook...
I will have to investigate that further, otherwise, I can send a copy to me and automate outlook to move those messages to the sent folder, but... I hope I'll find a better option.

Thanks for your messages!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900