emailto option in php

Reply

Join Date: Jul 2009
Posts: 1
Reputation: DiyaMV is an unknown quantity at this point 
Solved Threads: 0
DiyaMV DiyaMV is offline Offline
Newbie Poster

emailto option in php

 
0
  #1
Jul 2nd, 2009
Is there emaito option in HTML available in php

I want to open up outlook so that the user reviews the filled mail before sending it.

I want to include table and chart also in the body of the message.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 133
Reputation: kireol is an unknown quantity at this point 
Solved Threads: 17
kireol kireol is offline Offline
Junior Poster

Re: emailto option in php

 
0
  #2
Jul 2nd, 2009
nothing in PHP to do this. If anything it'd be a MIME type in HTML
Why do Daniweb moderators edit CODE tags into CODE=style but don't check "solved".
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 173
Reputation: FlashCreations is an unknown quantity at this point 
Solved Threads: 13
FlashCreations's Avatar
FlashCreations FlashCreations is offline Offline
Junior Poster

Re: emailto option in php

 
0
  #3
Jul 2nd, 2009
Well this wouldn't be PHP, it would be HTML and maybe JavaScript. You could create a link on your page like this:
  1. <?php
  2. echo "<a href='mailto:email@domain.com?subject=Email Subject&body=Insert HTML table here and chart here' id='emailLink'>Send Email (Opens in Outlook)</a>";
  3. ?>
For more on mailto: syntax see this page.
And you could even go the extra mile by adding this JavaScript code so that the link is automatically clicked when the page loads:
  1. <script type="text/javascript">
  2. clickEmailLink(){document.location.href=document.getElementById('emailLink').href;}
  3. </script>
This would require you to add onload="clickEmailLink();" as an attribute to your body tag. Like this, in case you were wondering:
  1. <html>
  2. <head>
  3. ...
  4. </head>
  5. <body onload="clickEmailLink();">
  6. ...
  7. </body>
  8. </html>

You must understand that not everyone in the word has Outlook or uses it. Unless you're positive that all of your users use Outlook, I would try for a simple PHP mail() command that would first print the message for the user to approve. Then once it was approved, the message would be sent by another PHP script.
Last edited by FlashCreations; Jul 2nd, 2009 at 11:06 pm.
FlashCreations
(aka PhpMyCoder)

About Me | My Blog | Contact Me
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 57
Reputation: emarshah is an unknown quantity at this point 
Solved Threads: 5
emarshah emarshah is offline Offline
Junior Poster in Training

Re: emailto option in php

 
0
  #4
Jul 3rd, 2009
Hello,

as the "Flash Creations " said, emailto is only to be used through html.... you can jst print it in php

like

print"<a href="emailto:abc@def.com" > Send mail</a>"
Syed Ammar Hassan
" A man is known by his level of Determinism "
--------------------------------------------------------
"Some cause happiness where ever they go, others whenever They go"
--------------------------XIII---------------------------
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 173
Reputation: FlashCreations is an unknown quantity at this point 
Solved Threads: 13
FlashCreations's Avatar
FlashCreations FlashCreations is offline Offline
Junior Poster

Re: emailto option in php

 
0
  #5
Jul 3rd, 2009
Originally Posted by emarshah View Post
Hello,

as the "Flash Creations " said, emailto is only to be used through html.... you can jst print it in php

like

print"<a href="emailto:abc@def.com" > Send mail</a>"
Yes, but as far as I know, it's mailto: not emailto: .
FlashCreations
(aka PhpMyCoder)

About Me | My Blog | Contact Me
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC