Gubbins Posted April 20, 2010 Share Posted April 20, 2010 Hello, I have tried to make a email that includes a small banner picture at the top of the email before the main text. If it is possible could someone please show me where in the code i could add the image address? $to = "".$name." <".$email.">"; $subject = "Test Login Details"; $message = "Thankyou for registering at Test, your login details are as follows: <br /> <br /> Playername: <b>".$name."</b> <br /> Password: <b>".$password."</b> <br /> <br /> You can now login at: <a href=\"http://www.test.com\">http://www.test.com</a> <br /> <br /> If you have any questions or queries please contact us (via the contact link at the bottom of the login page or message <b>Mr Test</b>) and we will be happy to assist you in what ever troubles you. <br /> <br /> You can now follow us on <b>Twitter</b> <url>http://twitter.com/test</url><br /> and on <b>Facebook</b> <url>http://www.facebook.com/test</url></center><br /> <br /> <i>Kind Regards <br /> test team</i> <br />"; $headers = "From: test@test.com\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Transfer-Encoding: ­ 8bit\r\n\r\n"; mail ($to, $subject, $message, $headers); Quote Link to comment Share on other sites More sharing options...
NTSmarkv Posted April 20, 2010 Share Posted April 20, 2010 Add your image into a variable: $html ="<img src='beerchug.gif'> then in $msg call the variable.. at the very beginning example: $message = "$html;<br />Thankyou for registering at Test, your login details are as follows: <br /> Quote Link to comment Share on other sites More sharing options...
Gubbins Posted April 20, 2010 Author Share Posted April 20, 2010 Add your image into a variable: $html ="<img src='beerchug.gif'> then in $msg call the variable.. at the very beginning example: $message = "$html;<br />Thankyou for registering at Test, your login details are as follows: <br /> It worked when i added closed quotes to the $html ="<img src='beerchug.gif'>"; but at the end of the image in the email i get ; <---that symbol.. Quote Link to comment 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.