|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#31
|
|||
|
|||
|
Re: mail() function gives problem
Hi ,
How can I insert a hyperlink in the mail that the person will receive. thank you . |
|
#32
|
|||
|
|||
|
New to PHP - Empty List box
Hey,
<br> <br> I have gone through the tutorial and installed everything and everything works. (I am learning as I go) <br> <br> The only problem I am having is the name of my lists does not show up in the index.php3 page. They are there, meaning there is a little colum and I can scroll between the two lists, but the names are not visible. I don't get why, it's like it's returning 0 lists, but there are lists. <br> <br> Any thoughts? <br> <br> |
|
#33
|
|||
|
|||
|
Re: mail() function gives problem
Most e-mail packages will pick up a full url such as http://www.devshed.com/ and show it as a hyperlink where as www.devshed.com would not. You can use html tagging if you use a content type like the example below. I stole mine from the headers of an html e-mail I sent myself from Yahoo Mail. I don't trust headers spit out from Outlook as half the HTML e-mail I recieve in Netscape from Outlook can't be read.
<!-- Code --> <p><pre><font color=#008000><xmp> <?php $recipient_name = "John Smith"; $recipient_email = "john.smith@bob.com"; $email_subject = "Albuquerque"; $email_body = "Albuquerque is a great song by Weird Al Yankovic.<br>\n It is available from <a href=\"http://www.amazon.com/exec/obidos/ts/music-glance/B00000JH89/qid=959820085/sr=1-9/104-4290353-3954300\">Amazon.com</a> on cd."; $sender_name = "Bob Robertson"; $sender_email = "bob@bob.com"; mail("\"".$recipient_name."\" <".$recipient_email.">", $email_subject, $email_body, "Content-Type: text/html; charset=us-ascii\nFrom: \"".$sender_name."\" <".$sender_email.">"); ?> </xmp></font></pre><p> <!-- Code --> |
|
#34
|
|||
|
|||
|
Re: Mail() command unsupported
try to use <i>imap_mail()</i> commant instead of <i>mail()</i><br>
<br> works for me.. |
|
#35
|
|||
|
|||
|
<i>12345</i>
....
|
|
#36
|
|||
|
|||
|
Re: <i>12345</i>
<i><h1>1234567890
|
|
#37
|
|||
|
|||
|
error?
I have a host that supplies me with php3 services. I have basically placed all required files in my root directory. Plus added the data directory. But I seem to end up with some errors eg below:
Warning: fopen("data/firstlist.lst","w") - Permission denied in (....my directory) saveemail.php3 on line 18 - does this mean I have to set up permission on my directories? It seems to me that it can't write the email contents into the file. Regards Richard |
|
#38
|
|||
|
|||
|
Mail the emails to.....
Hi,
I would like to know how to send an email to only the people who have signed up for that particular topic. Derek |
|
#39
|
|||
|
|||
|
Re: An Error in the code??
im getting an error to when i try to send mail.
Warning: Server Error in \php\mailinglist\sendemail.php on line 8 i havesent mail with mail() before but i cant get it to work on here |
|
#40
|
|||
|
|||
|
Re: error?
Sounds like you need to change the permissions of the /data folder to something like 777 (drwxrwxrwx).
This is not the safest way to save your data, though. I would sure like to hear someone's recomendation for a safer configuration for saving the data??? Michael Davis http://www.websitesuccess.net |
|
#41
|
|||
|
|||
|
email sender is "nobody"?
Hai there,
I have managed to get the thing working. Theres only one problem with it. The emails from the lists are being send by "nobody"! the headerinformation about who sended the message is being filled up by "nobody@s269.providername". does anybody know how to solve this litle, yet anoying problem? thanx |
|
#42
|
|||
|
|||
|
Re: email sender is
Please see my reply below to more general
question about header information. Greetings, Markus |
|
#43
|
|||
|
|||
|
Re: Header information
Hi Brad,
the problem is that the original text is a bit too terse on what the problem with having linefeeds in your original file with recipients is, and that the mail() function doesn't like that too much. What you need to do is to trim() off the trailing linefeeds from these address lines. I have added the following snippets of code (feel free to give the variables more sensible names ;-) ): From the sendemail.php3 file: (...) Code:
$addresses = file("data/$List");
$indeggs = 0 ;
while($addresses[$indeggs]) {
$addresses[$indeggs] = trim($addresses[$indeggs]);
$indeggs++ ;
}
for ($index=0; $index < count($addresses); $index++)
{
mail("$addresses[$index]", "$Subject",
"$Body", "From: $From\nReply-To: $From\nX-Mailer: PHP/" . phpversion());
}
(...) As you can see, before the mail() function I am looping through the input from file and trim() all trailing line feeds. When that is done, everything works very smoothly and headers look like they're supposed to. Hope this helps, Markus |
|
#44
|
|||
|
|||
|
Re: Header information
Hi Brad, the problem is that the original text is a bit too terse on what the problem with having linefeeds in your
original file with recipients is, and that the mail() function doesn't like that too much. What you need to do is to trim() off the trailing linefeeds from these address lines. I have added the following snippets of code (feel free to give the variables more sensible names ;-) ): From the sendemail.php3 file: <!-- Code --> <p><pre><font color=#008000><xmp> $addresses = file("data/$List"); $indeggs = 0 ; while($addresses[$indeggs]) { $addresses[$indeggs] = trim($addresses[$indeggs]); $indeggs++ ; } for ($index=0; $index < count($addresses); $index++) { mail("$addresses[$index]", "$Subject", "$Body", "From: $From\nReply-To: $From\nX-Mailer: PHP/" . phpversion()); } </xmp></font></pre><p> <!-- Code --> As you can see, before the mail() function I am looping through the input from file and trim() all trailing line feeds. When that is done, everything works very smoothly and headers look like they're supposed to. Hope this helps, Markus |
|
#45
|
|||
|
|||
|
This is the problem!
okay, the problem explained again:
The thing is this: I know how to send an email in php with the header-information and all, no problem. Except for when i do this in a loop-statement. When the script reads the destination-adresses and send the mail, the header-information is ignored and appears in the body of the message. How is this possible? |
![]() |
| Viewing: Dev Shed Forums > Other > Development Articles > Creating a Mailing List Manager with PHP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|