Hi.. I'm a newbie here, also to PHP.
NOw I have a question about php newsletter. I have a simple newsletter script which use .txt database.for the emails. Everything works fine.
However, I want an image header on the mail body.. like logo. So everytime I send my newsletter, the image will appear on the top of the mail body. But I can't get it. Could anybody tell me how to do it? Here is part of the php script for the email.
<?php
include "config.php";
include "header.inc";
if(!($sendmail)){
?>
<form method="POST" action="<?php echo($PHP_SELF); ?>">
<h3>News </h3>
<p>Select Mailing List:<br>
<select size="1" name="list_choice">
<option selected>emails.txt</option>
</select></p>
<p>Title:<br>
<input type="text" name="subject_choice" size="50"></p>
<p>Message:<br>
<textarea rows="6" name="message_choice" cols="42"></textarea></p>
<p><input type="submit" value="Send Mail" name="sendmail"><input type="reset" value="Reset" name="B2"></p>
</form>
</UL>
<?php
}
$header = "From: $from_mail; \n";
if ($sendmail == "Send Mail"){
print ("<H3>Sending news to emails...</H3><P>");
$file_handle = fopen($list_choice, "r") or die("Couldn't open mailing list..");
while (!feof($file_handle)) {
set_time_limit(0);
$address = fgets($file_handle, 1024);
mail("$address", stripslashes($subject_choice),
stripslashes($message_choice), $header);
print ("Mail Sent To: $address<br>\n");
}
print ("<H3>Done! The news is sent. Klik <A HREF='view.php'>Click here</A> to see the emails.</H3><BR>");
}
include "footer.inc";
?>