Do email servers have standard folder naming or ids? - email

I'm trying to append sent emails to the "Sent" folder in different email accounts running in different servers (yahoo, gmail, outlook, etc.)
For that purpose, I'm using the imap_append function where I have to give the name of the folder I want to append the emails.
The problem is that every account has different folder naming and languages. For example, Gmail has [Gmail]\Sent, a Spanish Yahoo account has Enviados, etc.
Is there a solution for this? I have tried to send the emails to INBOX.Sent but not working at all.
Is the only solution asking the user to define his "Sent" folder?
Edit:
I have checked the tags for the [Gmail]\Sent folder in a Gmail account and I don't know why it has no \Sent flag defined. How are mail clients supposed to know that the sent emails should be copied here?

Related

Store sent mails using PHPMailer into Office365 account

I've started using PHPMailer with an Office365 account and by now it works fine sending emails through SMTP. Anyway I need to store the sent emails, so I've tried #DavidRockin's code but I'm unable to make it store sent emails into the 'Sent items' folder (only the inbox works). Any help?
You need to check if the sent folder exist and the correct name, it can have a similar meaning but different spelling.
First, use php_imap to get a list of folders, the one used for storing sent emails can be used with imap_append method

Unique identifiers within a 'mailto' link

I am sending a bunch of emails to a list of clients, approx 200-500. I am wondering if there is a way I can identify the replies, other than from the email address.
Eg. I could send two emails to the same email address as a husband and wife share that email address.
I am not a code expert by any means (or even an amatuer!) and will be using Outlook to send these emails.
Here is a crude example of what i am using at the moment:
mailto:reidster#work.com?subject=this%20is%20a%20test%201&body=I%20opt%20out%20of%20email%201
&
mailto:reidster#work.com?subject=this%20is%20a%20test%202&body=I%20opt%20out%20of%20email%202
Any assistance much appreciated
You could make a rule in Outlook,
that says Take all Emails from this clients and put them in one folder.
Or if there is the same subject: if there is a subject with this words put them in one folder.
Is it that what you mean ?

Migrating from POP to IMAP, multiple account folders

I am about to migrate all of my email accounts to using the IMAP protocol instead of the POP protocol. The problem I have is that the folders I currently have in Outlook have email in them from multiple accounts. So for instance I have a folder called 'Enquiries' which includes emails from 'enquiries#company1.com' and emails from 'enquiries#company2.com'
Is there a way to combine folders from multiple IMAP email accounts that are on my server? Or do I have to have separate folders for each account? Can I have one large 'PST' file on my server to hold all of my email accounts?
Additionally, if I open up Outlook on my laptop, will I be able to see all of my emails from the past even if I lose my internet connections? Is this what 'Idle' mode is for?
IMAP supports sharing. But folders belong to a user. So it's unusual to want to do what you have described.
If you want the mail to appear in the same folder, I'm pretty sure you will need to configure your mail server(s) to direct all incoming mail for those two addresses into the same user/folder.
PST files are not an IMAP thing - they're a proprietary Microsoft thing, so no, you can't do that with IMAP.
As for lost internet connection, this should be straight-forward for you to test. Simply disable your internet and see what happens. Try it with messages and folders that you have and haven't previously opened.
This Microsoft article about working offline makes me think that you won't be able to view existing messages.

Can't receive emails send from php

I have set up several email accounts on my vps hosting but I can't receive any emails that are send via php from another hosting. Everything works fine when I send emails from gmail for example, I receive them without a trouble. Does anyone know any reason why emails sent from php can't be received?
Try using phpmailer, it's a good mailing class which automatically sets well defined headers so that the mail is more likely to not land in the spam folder.
Sounds like a spam filter issue. Have you set up a proper Sender ID/SPF framework in your domain name service so that the host appears to be a valid MTA for this domain? Look here for a detailed explanation of Sender ID/SPF/DKIM, etc.
Check your spam folder.
GMail is able to differenciate if a mail has been sent from outlook for example or an automated application. (I dont know how, but they can). If i send an email from my work account to GMAil works, if its a web app or executable with the same email adress, it ends up on the spam folder.

How do I "send" emails to the Sent Folder

We provide a web service that can email invoices and statements from our servers to our users customers.
Our users have asked us that all emails sent from the web-service are also stored in the Sent Folder of the person using the web service.
We know the users email, and we could insist they provide us with IMAP access credentials.
What options do we have for saving emails sent by a user from our server in the Sent Mail folder of that user?
(hope that makes sense. It was pretty hard to explain)
Since this is internal, you might be able to get an easy way out. BCC the person that is 'sending' the email, then they can setup a rule that moves any emails sent from your web service outbound email (or however you can flag them) to move that email to whatever folder they want.
This keeps credentials out of the process and may help to keep your SMTP servers a little more stable as well for sending out these emails (not constantly having to deal with mistyped names/passwords).
If it is an internal employee (s), then why not
- add them as the addressee of the mails (to, cc or bcc)
- add a filter that when such an email comes (from this service, to you, cc you or bcc you, as the case is) send it to the 'sent' folder?