Chronix Posted April 7, 2011 Share Posted April 7, 2011 (I am not an expert or even a begineer at PHP, so sorry if none of this makes sense) Right ok, I have an invitation form built and tested working correctly between a php page and a mysql database and got the mail function to work but now the mail function is throwing all emails into the junk mail folder of outlook. The user of the invitation form has to enter a valid email address (the form has its own validation for each textbox and email has been set to required email address). So I have been asked to set up a mailto instead of using the mail function (dont ask me why...) And I cant, for the life of me, figure out how to get this to work. What I have thought of so far is: Index.html (Invitation page) V sendinvitation.php (previously the page with the mail function) now includes a confirmation of the data being sent to the database and a button to go to the next php V sendmail.php (I want this to be able to get the data from the database and then open up the users email client and pre populate the email with the body text) Is this even possible? If not, is there a reason why the email keeps getting thrown into the junk mail. Please, any help would be most appreciated! EDIT: Let me explain a bit more, just re-read over and its very brief (this probably will be too) I want to invitation form to submit the users data to my database in mysql, then when the form as been submitted, to be able to then grab the data and pre populate an email using variables that are in the php linked to the database (Im guess the php would go from POST to GET?) Quote Link to comment https://forums.phpfreaks.com/topic/232973-urgent-help-please/ Share on other sites More sharing options...
MatthewJ Posted April 7, 2011 Share Posted April 7, 2011 You can populate a mailto link... but I'm not sure why you would want to... it sounds like this is going to a single person to check for invitations being submitted? If so, then why not just tell outlook it isn't junk and move on? If that isn't an option, check that you are setting a From header. If it is omitted, it will send the email as the [email protected] etc. Quote Link to comment https://forums.phpfreaks.com/topic/232973-urgent-help-please/#findComment-1198190 Share on other sites More sharing options...
Chronix Posted April 7, 2011 Author Share Posted April 7, 2011 Ive done it! Ive basically sent all the data as normal to the mysql database via the php page, but also on the php page, ive added a "click here to send email" link which has a <a href""></a> around it and inside the href is php that is pulling the information from the database and posting it into the mailto through variables. I know this probably isnt the best thing but its working and its not going to junk mail and thats all I care about at this time! Quote Link to comment https://forums.phpfreaks.com/topic/232973-urgent-help-please/#findComment-1198213 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.