I need to open outlook when clicking a button on a webpage.
It must create a new mail with prepopulated fields.
Here's my problem :
The mail body must contain some dynamically generated HTML.
I tried with a mailto but apparently it can only contain plaintext.
What other solution do I have ? (The mail can't be sent server side because the mail must come from client mail address).
Thanks for your help !
mailto only works with plaintext.
For Outlook users you can create your own oft-file and offer a download.
See this example (Just follow the 5 steps)
http://apps.devryeducationgroup.com/brandguidelines/devryuniversity/email-templates.htm
Your second option would be:
Just ask for the customers-email address, and sent him the full email with populated fields as an email. Then he just has to click "answer" and you get the information beeing send from the customers email adress.
(Like saying, "thx for contacting us, please confirm your request by answering this mail")
Related
I have made a form that once submitted sends a set of details to the client email using the mail() in php.
The email has html encoding with two buttons: Accept and Reject.
Is there a way to capture the click event from inside the email if Accept or Reject button is pressed in the received email? If yes, how? (Can't find any info on this) And will it also work on all email clients? I am currently testing it in my gmail account.
when a user submits Contact Us form on our site and the info comes to us the email header contains from: abc#gmail.com via 218208-db2.christiandatingforfree.com. We dont want via 218208-db2.christiandatingforfree.com in the header part. Any suggestions...
That isn't something you can control. Gmail does it for the sake of security, otherwise you could send an email with the from field as support#gmail.com
Is there a PHP method to fetch the default email of a user? same effect if you would use mailto:
Example scenario:
If you use mailto:some#email.com to open mail client it would automatically fill in the "From" field of the form with the user's email.
I want to do the same effect to my PHP form. I want to fill in with the default email address with the user email. so when they press contact, it would automatically fill in the email field with the users default email.
Is possible?
Note: should also be compatible with mobile phone, like iPhone and Android.
Thanks!
No, your PHP script cannot track your clients (users) and see what their email addresses are.
The mailto: links only open the default mail client on the user's machine and fills in the proper details (taken from your mailto: link).
No, there is not possible way of doing that.
I am not sure if it is in the headers or not, but I am looking for a way to tell if an email I receive is a response to an email I sent, and if so, to only grab the new text, not "quoted text"
A little background: I am creating a script that will send out emails automatically. I am creating a cron job to run at periodic intervals to check to see if there were any replies. If there were replies, I only want to grab the new stuff, and not the old stuff.
In the past, I would send out emails with the id in the subject (You have a new response [1234]), and would then check the subject for the stuff in between the [ and ]. Then I would grab all the message and store it since every web browser/email uses a different character or style for quoted-text. Some do ">" some do a horizontal rule, some do absolutely nothing.
Anyways, I am just looking for something in the email header that would indicate they are replying and what the new text might be. If it's not possible, I will just keep on doing what I am doing.
You can know if an email is the reply of another email or not by using the combination of In-Reply-To and References.
Every email has a unique ID in its header called Message-ID, according to this RFC 1, you can track the ancestors of any email.
I have checked it and it is working in all clients (Outlook, Thunderbird)
I will give an example to use.
1- In the header of the email you send for the first time, you (your mail server or you in code) send an ID (Message-ID), if you open source of the email you will see it like this in top section:
... // You (your code) send:
Message-ID: <1#your-domain-mandatory.com>
...
You just need to keep this Message-ID in your program. any subsequent reply will refer to this ID.
2- Client will reply email 1 to you. Client will send a crucial header for you to tell you for which email this reply is in addition to its own Message-ID.
... // Client(Thunderbird) send:
Message-ID: <2#your-domain-mandatory.com>
In-Reply-To: <1#your-domain-mandatory.com>
...
When you receive the second email, it will be easy for you to keep track of the previous email you have sent because the ID of mail(1) is in the In-Reply-To header of the mail(2).
3- if you want to reply back this email again inside your code, you just need to put the Message-ID of the mail(2) in In-Reply-To header and Message-ID of mail(1) and mail(2) in References header. So the client will understand the chain correctly.
... // You (your code) send:
Message-ID: <3#your-domain-mandatory.com>
In-Reply-To: <2#your-domain-mandatory.com>
References: <1#your-domain-mandatory.com> <2#your-domain-mandatory.com>
...
By this header, you are telling the client that this email is a reply to the mail(2) and the ancestors are mail(1) and mail(2).
I have worked with them and read about them and it is working, my problem now is to just get the text of the last email and not the quoted text from the replies. (we are running our own Ticketing system, we create a comment for each email)
Unfortunately, e-mail clients can essentially do whatever they want with your message, and there is no reliable standard for determining how a received message originated at the client. In addition, IMAP doesn't really have anything to do with it. E-mails can be sent a number of different ways, including webmail.
The best you can do is look for an ID number in the subject line (assuming folks don't change it, which they rarely do). You can also do what Google does... fuzzy match the reply text to e-mail you sent to that address. If it matches, consider it part of the reply. This takes great effort though.
This is sort of a complex issue, hopefully you can help.
I am using php mail() to send an HTML formatted email of blog content (an "email to a friend" option sends post content to a user supplied email address).
I am having an issue with Comcast.net email addresses.
The HTML formatted email comes through correctly when viewed on Comcast.com's internet mail, but when POP3ing it to outlook, the html format is stripped and the user gets only the html code.
So, when an HTML formatted email is sent to a comcast.net address and then pulled to outlook via POP3 the HTML format is stripped and only displays the html code.
One interesting thing to note it that when viewing the email on Comcast.com's mail viewer the from line is present, but after being pulled into Outlook the from line is blank.
I have tested this with other accounts, gmail, aol, yahoo, and these all POP3 to outlook correctly, it is specific to Comcast.
Anyone have any ideas why this would be happening?
[UPDATE]
I removed the "\r" from the header information (as suggested here) and it corrected the format issue
Can anyone shed light on this?
Thanks!
I removed the "\r" from the header information (as suggested here) and it corrected the format issue.
Hope this helps everyone.