php mailto () fuction

Reply

Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: php mailto () fuction

 
0
  #11
Apr 4th, 2008
Originally Posted by nav33n View Post
I didn't get you.. What I said was,
concat <img src='row1['broad1']> to $message. So, it will be like,
$message.=$row1['broad1'];
then again,
  1. $message.=<p>&nbsp;</p></div></th>
  2. <td width=\"77%\" scope=\"col\"><table width=\"99%\" border=\"0\" cellpadding=\"10\" cellspacing=\"0\">
  3. <tr> //.... and so on
  4.  
would this not just send the image as the message and not put any of the text to go with it.

also there will be more than one image to be placed on this page, that is why i was asking if it would be possible to assign the data from the db to their own variables.

the page that will be emailed out will have a title section with an image and some body text and underneath that there will be the same again with different titles images and text.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: php mailto () fuction

 
0
  #12
Apr 4th, 2008
Yep. Thats possible. Write the images to a page. Send the mail with attachments.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: php mailto () fuction

 
0
  #13
Apr 4th, 2008
Originally Posted by kevin wood View Post
would this not just send the image as the message and not put any of the text to go with it.
No. Since you are concating previous value of $message with the images, the text along with images will be sent.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: php mailto () fuction

 
0
  #14
Apr 4th, 2008
the last line of mysql query now looks like this

$message.= '<img src="'.$row['broad1'].'"/>';
i think that is how you wanted me to put it. it is now giving me an error when i try to load the page saying unexpected $ at the end of the code but this must have something to do with the $message=. within the html code.

can the mail function only send pure html with no php inside the message body. if that is the case could something like $message=<a href="broad_prev.php"></a> work to get the page to display once the email has been sent.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: php mailto () fuction

 
0
  #15
Apr 4th, 2008
i think that is how you wanted me to put it. it is now giving me an error when i try to load the page saying unexpected $ at the end of the code but this must have something to do with the $message=. within the html code.
No.. there is an unclosed bracket.. Find it and close it !
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: php mailto () fuction

 
0
  #16
Apr 4th, 2008
on looking into it the a href would probably not work but is it possible to set the subject of the message to be a php page as this way the php will not have to be put into the message body an it should not throw up any errors (if it works).
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: php mailto () fuction

 
0
  #17
Apr 4th, 2008
the $subject variable i used for the message title so this is not going to work either. i ahve just been looking at some code which uses a textarea for the body of the message can this be edited so that the text area contains the preview page.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: php mailto () fuction

 
0
  #18
Apr 4th, 2008
Why not write a new script ? You can check this example here to send mails with attachments.
http://www.webcheatsheet.com/PHP/sen...attachment.php
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: php mailto () fuction

 
0
  #19
Apr 4th, 2008
i have just been looking more at the example that uses the textarea and to get the body of the message imported into the email it uses this $message = $_REQUEST["body"];
could this line of ode be modified so that instread of the body in the request it would look something like this

$message = $_REQUEST["broad_prev.php"];
can the $_request variable be used to recall a page instead of an textarea?
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: php mailto () fuction

 
0
  #20
Apr 4th, 2008
Originally Posted by nav33n View Post
Why not write a new script ? You can check this example here to send mails with attachments.
http://www.webcheatsheet.com/PHP/sen...attachment.php
this would send the newsletter as an attachment would it not?

i would be happy to do it this way but i do not have the final say on how the email will look and the boss wants the email to be the message without attachments.
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