Development Articles
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDevelopment Articles

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #31  
Old May 23rd, 2000, 03:42 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: mail() function gives problem

Hi ,

How can I insert a hyperlink in the mail that the person will receive.
thank you .

Reply With Quote
  #32  
Old May 27th, 2000, 01:11 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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>

Reply With Quote
  #33  
Old May 31st, 2000, 08:48 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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 -->

Reply With Quote
  #34  
Old June 15th, 2000, 09:41 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Mail() command unsupported

try to use <i>imap_mail()</i> commant instead of <i>mail()</i><br>
<br>
works for me..

Reply With Quote
  #35  
Old July 4th, 2000, 09:12 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
<i>12345</i>

....

Reply With Quote
  #36  
Old July 4th, 2000, 09:14 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: <i>12345</i>

<i><h1>1234567890

Reply With Quote
  #37  
Old July 19th, 2000, 05:23 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #38  
Old July 19th, 2000, 08:48 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #39  
Old July 27th, 2000, 01:05 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #40  
Old August 2nd, 2000, 01:22 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #41  
Old August 16th, 2000, 06:57 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #42  
Old August 28th, 2000, 11:12 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: email sender is

Please see my reply below to more general
question about header information.

Greetings,
Markus

Reply With Quote
  #43  
Old August 28th, 2000, 11:19 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #44  
Old August 28th, 2000, 11:22 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #45  
Old August 29th, 2000, 01:52 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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?

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDevelopment Articles > Creating a Mailing List Manager with PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |