DeX Posted October 22, 2010 Share Posted October 22, 2010 I have a form on my website that currently uses the mail() function to send the information it collects and all works fine. I want to switch it over to open the email in Thunderbird on the user's machine so they can view it prior to sending. This should be much less complicated but I can't find answers anywhere, all I want to do is just open the email in the user's email client with the proper information/attachments included. Anyone? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/216526-how-do-i-create-an-email-in-thunderbird-using-php/ Share on other sites More sharing options...
Pikachu2000 Posted October 22, 2010 Share Posted October 22, 2010 PHP is a server-side language. As such, it can't do anything on the user's machine. Quote Link to comment https://forums.phpfreaks.com/topic/216526-how-do-i-create-an-email-in-thunderbird-using-php/#findComment-1125100 Share on other sites More sharing options...
DeX Posted October 22, 2010 Author Share Posted October 22, 2010 Right, so I guess I'd have to use Javascript to do that. Quote Link to comment https://forums.phpfreaks.com/topic/216526-how-do-i-create-an-email-in-thunderbird-using-php/#findComment-1125116 Share on other sites More sharing options...
merylvingien Posted October 22, 2010 Share Posted October 22, 2010 What if the user doesnt have thunderbird? I take it they are writing the message? If so why not just display thier message as you intend it to be displayed on the page below the input form? Easily done with ajax, as they write, the text appears just below the input box, but formatted how you want it... Quote Link to comment https://forums.phpfreaks.com/topic/216526-how-do-i-create-an-email-in-thunderbird-using-php/#findComment-1125172 Share on other sites More sharing options...
DeX Posted October 30, 2010 Author Share Posted October 30, 2010 This is for a single client that will be sending quotes to their own clients so they want to use their own Thunderbird system to: 1. Keep a copy in their SENT items folder. 2. Write a personalized message in the email prior to sending it the attached PDF. So right now I'm using DOMPDF to auto generate the PDF version of the quote and send it automatically via PHP using the mail() function. They can't do the things above with this method so I just need to move everything over to create the email in their email client prior to them hitting SEND. Quote Link to comment https://forums.phpfreaks.com/topic/216526-how-do-i-create-an-email-in-thunderbird-using-php/#findComment-1128476 Share on other sites More sharing options...
DeX Posted October 30, 2010 Author Share Posted October 30, 2010 Actually I'm getting closer with the mailto() function, that takes an attachment parameter that allows you to specify a file to send with the email and will open it in the client's email program. The only problem with this is it looks for the file on my local machine, is there a way to specify a file on the server? Quote Link to comment https://forums.phpfreaks.com/topic/216526-how-do-i-create-an-email-in-thunderbird-using-php/#findComment-1128501 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.