Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





PEAR, Mail Queue And Mail Mime


I have some trouble with my application.
It is written with PEAR, SMARTY ....
I should send an email to me and with Bcc to 50's else adresses.
But it send it just to me.
I am on an easyPhP server.
Here is my code

$mail_queue =& new Mail_Queue($db_options, $mail_options);

$from = 'my@email.org'
$from_name = "MY";
$replyTo = "my@email.org";
$message = stripslashes($msg);
$from_params = empty($from_name) ? '"'.$from_name.'" <'.$from.'>' :
'<'.$from.'>'
$hdrs = array( 'From' =$from_params,
'Reply-To'=$replyTo,
'To' =$from,
'Bcc' =$liste,
'Subject' =$sujet );

$mime =& new Mail_mime();
$mime->setTXTBody($msg);
$mime->addAttachment($pdf, $attach_type);
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
$seconds_to_send = 1;
$delete_after_send = true;
$id_user = 7;
$mail_queue->put('','My Organisation',$from, 'my@email.org', $hdrs,
$body, $seconds_to_send, $delete_after_send, $id_user);

$liste follow this pattern "titi@tito.fr<titi@tito.fr>,
tita@tito.fr<tita@tito.fr>,titz@tito.fr<titz@tito.fr>,
tite@tito.fr<tite@tito.fr>,"

How can I do to send My emails to the Bcc's addresses too ?




View Complete Forum Thread with Replies

Related Forum Messages:
Sending MIME Format Email Without The PEAR Mail Mime Package?
Just wondering if anyone could please help. I would like to use PHP to send
MIME format emails (with binary attachments). But I have to do this without
the use of the mail mime PEAR package? We are on PHP 4.2.2 and we cannot
change that, and we cannot install that PEAR package due to our web hosting....

View Replies !
Mail Queue
i am creating an e newsletter application and want a mail queue. eg. the mail has to be sent to 300 people it list who is left to send it to.

View Replies !
Mail() - SMTP - And Server Queue
I have made any test with high volume sent with mail() and with direct STMP connection
I monitoring under WHM of my server the QUEUE (under mail queue manager)With the first (mail()) I see only 20% in the queue, other is sent immediately With the SMTP I see 100% on the queue and I must send manually (with delivery now) and sent is really slowly.

View Replies !
Read Html/txt Mail From Postfix Queue
I'm looking for a php class script that display hmtl+txt mail from postfix queue.

View Replies !
Mail() And MIME
I have a multi language website. Sometimes users send messages to us via the online contact form. This uses the mail() function in PHP.

The problem is, when chinese or korean is in the subject, the from and subject data is lost.

Actually it is fine in gmail, yahoo mail, thunderbird and everyones email client except my companies local email client (Eudora, japanese version). So for everyone else it is ok, only us here get the lost data. I dont know if this is caused by our homemade anti-spam program or Eudora or something else. The systems guy said its a bug in my code, which is think is dubious. Something about the MIME type not being set correctly etc.

View Replies !
PEAR's MIME Mail
I've created a cron that emails me (as attachments) the week's DB back ups. The problem is that they're GZ files and while I've used PEAR's MIME Mail class before with sending images and so on, with a GZ'd file, it seems to print all the data in the email rather than attach it! Any ideas? Would it help to give the files a new extension?

View Replies !
Multipart Mime Mail
I haven't send any multipart mime mail before and now when I try the following I don not get message body. Means message body of the mail comes out to be blank. Code:

View Replies !
Fetching And Managing Mime Mail
Is there a nice tidy php class that will allow me to fetch mail from a
pop server and break up and retrieve the different mime parts and
such... that is at a higher abstraction than the more simpler imap_
routines found in php? Basically I want mime and pop/imap management
past the simple facility provided by php.

View Replies !
MIME Mail Headers (date)
i am trying to edit my email headers fo a simple email to manipulate the date field ,ie: i want to set the date the email was sent and when the client displays the date it will show up as the date i used , i have tryed a few fields but none seam to work correctly.

what will happen with this is that say i sent the email to a hotmail account it would display in the list the correct date it was sent on but once opened the date field will show the date i have entered. is there a correct way to do this so in the main list it will show as if it arrived on the date i sent it ??? PHP Code:

View Replies !
MIME Html E-mail To Gmail
i have met a problem that i can send the html e-mail by using MIME via php to yahoo mail and hotmail, but when i was try to send to gmail, it show all the html coding. can someone help me to solve this kind of problem?
the coding i made----->:

<?php
$a=<<<A
<form action="" method="post">
<input type="submit" name="submit" value="submit">
</form>
A;
echo $a;
if(isset($_POST['submit']))
{
$to = 'stam1982@gmail.com,stam_1982@yahoo.com'

$subject = 'Testing'
.........................

View Replies !
Sending MIME-mail (subject Encoding)
If i send a charachter like "ö", "ä" and "ü" the mail-client get's always "?". i think, that it isn't encoded correctly. in the body (with base64-encode) i get the right charakter. So i would know if i must decode also the subject and how i can do this?

View Replies !
Parse Error In Mime Mail Class
so i'm trying to implement this mime mail class from my trusty php book, but i keep getting a parse error. i'm not sure how some of these strings are supposed to be formatted. PHP Code:

View Replies !
Php Mail() MIME Shows Cleartext Headers
I am struggling with the php mail function so to allow a multipart mime settings where both the message and any set of attachments can be allowed. Teorically, I'd know how to do. I build up my headers and pass them as the fourth argument of the function mail().

Practically, what happens is that whenever I try to test my script emailing myself, what appears in the email body are the __cleartext__ headers.


ùMaybe you spot in them something wrong, this is what in an email body appears (and should not) in cleartext: ....

View Replies !
Mime Mail Base64 Vs. Quoted-printable Encoding
I recently set up a form script that formats data into an html layout and sends it as an attachment to a regular email message. If I use base64 for encoding, some Mac folks who normally can receive html attachments do not receive any attachments from my form script, only a plain text version of the data in the email body.

However, if I use quoted-printable it seems that both mac and windows users receive the attachment. Is quoted-printable a standard encoding type and should it be used instead of base64 for html attachments?

View Replies !
Mail() Vs PEAR:mail
I want to create a script to send an e-mail to a given address using PHP. I have been reading I can use the PHP's built-in mail() function, but in order to do that I have to specify the sendmail path (or whatever SMTP in used)

a) Does that mean I have to be running my MTA in the same machine where I have my LAMP? Code:

View Replies !
Mail Problem - Warning: Mail() [function.mail]: SMTP Server Response: 550 Invalid Recipient:
Whenever the recipient's email address includes a hyphen ( - ), I get the following error message...

Warning: mail() [function.mail]: SMTP server response: 550 Invalid recipient:

I should stress that this only seems to occur when the hyphen is in the URL portion of the address, i.e example@perfect-example.com

The current code works along the lines of...

mail ($_POST['email'], 'Email subject is here', $body, $headers);

View Replies !
PEAR MAIL
Is it possible to send an authenitcated message using SMTP and a mail mime message in one message?

I want to send emails to places like outlook express but any email needs to be authenticated which is simple enough but including HTML in those emails is something I've not been able to do yet.

Also are there any good places to get tutorials on PEAR; I have found that the official website is great for reporting bugs etc, but there is no place for code examples

View Replies !
PEAR And Mail
I am running a linux computer without a local mail server, but i want to send mail via php script. From what i have read, i can use an external mail server with PEAR::Mail, but i cant find much documentation (thats easy to read) to set it up.

View Replies !
PEAR Mail() Problem
I THINK I have access to the PEAR packages in my /path/to/pear/...
directory. I tested a simple php page with just :
require("/path/to/pear/Mail.php");
and the page displayed properly so I assume that means my page can see that
directory - I might be wrong.

Here's the code for sending the mail:

$recipients = 'me@mydomain.com'
$headers['From'] = 'me@mydomain.com'
$headers['To'] = 'me@mydomain.com'
$headers['Subject'] = 'Test message'
$body = 'Test message'
$params["host"] = 'smtp.mydomain.com'
$params["auth"] = True;
$params["username"] = 'loginID'
$params["password"] = 'password'
echo 1;
$mail_object =& Mail::factory('smtp', $params);
echo 2;
$mail_object->send($recipients, $headers, $body);
echo 3;

It gets through 2 then does NOT display 3. So, it is not executing the send
command. (I am using smtp mail for a purpose).

How can I test or troubleshoot form this point? Any ideas what is going on
or not going on?

View Replies !
Pear Mail Problem
The below code seems to work fine but it doesn't send the email. Why is this? Code:

View Replies !
Pear Mail Class
I have installed Pears Mail Class. Code:

View Replies !
PEAR/php Mail() Problem
I just set up a new server with Fedora Core 4, my old server was RedHat 9. I always sent multipart messages with PEAR via SMTP and it has always worked fine. So I transferred my app over to the new server. No change in code and it will not sen emails even though the script runs and prints my E-mail sent message.

Is there any other settings I have to configure to get this going. PHP and PEAR are installed and work fine. Like I said, the script runs but I never get the emails. Just to test I made a test page and ran a regular php mail() command and it will not send either.

View Replies !
PEAR: Using PEAR_Error In Mail::send()
I'm trying to send e-mail using PEAR's Mail class--for testing purposes
actually, I've never had any problem with conventional mail(). This is
what my code looks like:

$mail_object=&Mail::factory('sendmail', $params);
if($mail_object->send($to, $headers, $body)){
header('Location: '.$url_ok);
}else{
header('Location: '.$url_ko);
}

This works (i.e., sends mail) but I know it isn't fine. My code never
shows any error, even after removing sendmail link... The send() method
returns "TRUE or a PEAR_Error object, if fails" and I just can't figure
out how to use that. PEAR online manual doesn't include an example of
error handling, at least in this chapter, and I'm rather new to object
oriented programming.

View Replies !
PEAR Mail - $recipients Vs. $headers['to']
So, what's the story here? The manual says I can use an array or csv
in the $recipients, but using the same array in the $headers[to] gives
me an Array@myhost.com.

It works, and both joe and larry get the mail, but I guess I'm using
the $headers[to] incorrectly...

<?php
include('Mail.php');
$mail_object =& Mail::factory('mail', $params);

$to = array('joe@adsfadsfads.com','larry@asdfasdfasd.com ');

$headers['From'] = 'webform@sadfasdfasdfasdf.com'
$headers['To'] = $to;
$recipients = $to;
$headers['Subject'] = "website form";

$body = $message;

$mail_object->send($recipients, $headers, $body);
?>

View Replies !
Pear Mail On IIS6 Server
I am just setting up a win 2003 server running IIS6 , php, with pear
packages installed.

I am trying to get the Pear Mail package working but cannot get it to send a
message and it returns no error showing why.

here is the code I am using.

<?php

require_once("Mail.php");
$body = "Hello -Just testing.

";

$to = 'me@myaddress.com'
$headers['subject'] = "Mail Test";
$headers['From'] = 'me@myaddress.com'
$params['host']="smtpout.secureserver.net";
$params['auth']='LOGIN'
$params['username']='me@myaddress.com'
$params['password']="mypass";
$params['port']=25;

print "Subject = ".$headers['subject']."<br>";
print "To = ".$to."<br>";
print "Body = ".$body."<br>";
$message = &Mail::factory('smtp',$params);
if (PEAR::isError($message)) { die($message->getMessage()); }
$message->send($to, $headers, $body);
if (PEAR::isError($message)) { die($message->getMessage()); }
?>

the page takes a while to load (45-60 seconds) and it shows the 3 lines from
print commands. It shows nothing else.

display_errors = on in php.ini and I do get error messages if I have errors
in coding (ie. include a file that does not exist).

View Replies !
Send HTML Mail With PEAR
Im trying to send a html mail through PEAR but what I get in mail is blank email. Code:

View Replies !
New Server - PEAR Won't Send Mail
I have just set up a new Fedora server. All my scripts are running great but i cannot get pear to send emails for the life of me.

I am using the same script from my previous server and it does not work even though it give no errors and says it sends the mail. Here is the script. Is there anything else I need to do on the server to make sure it will send correctly? Code:

View Replies !
Warning: Mail(): Bad Parameters To Mail() Function, Mail Not Sent. In /
I have a website with a contact form and I tested to see if the form would actually send the submitted info to my email but I get this error...

Warning: mail(): Bad parameters to mail() function, mail not sent. in /home/content/g/o/l/goldenhills/html/email_us.php on line 62

Here's the php code:

View Replies !
Mail() [function.mail]: SMTP Server Response: 550 Not Local Host Gmail.com
I do a mail() and get:

Warning: mail() [function.mail]: SMTP server response: 550 not local host gmail.com, not a gateway in C:xamppxampphtdocs estsitemail.php on line 7


<?php
ini_set("SMTP","rlwatkins.com");
ini_set("sendmail_from","hunter@rlwatkins.com");
mail("huntercjcarroll@gmail.com","hello me","spamtastic","From: hunter@rlwatkins.com");
?>

what is wrong with this, how do i set it so that i can send to something other than localhost?

View Replies !
Warning: Mail() [function.mail]: SMTP Server Response: 501 Syntax Error
When I try this under windows :

mail("User <user@example.com>",$subject, "", $headers);

I get this error :

Warning: mail() [function.mail]: SMTP server response: 501 Syntax error,
parameters in command "RCPT TO:<User <user@example.com>>" unrecognized
or missing in

It seems to add it's own <> characters. If I run the same script under Linux it works fine !?

View Replies !
Warning: Mail() [function.mail]: SMTP Server Response: 501 5.5.4 Invalid Address
I receive this error:


PHP Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in D:clientsebiblecommentary.comconcordia-seminary.caconcordia-seminary.ca\_demo
egister.php on line 464

Both of my mail() uses fail, and I'm not sure why. I've followed the same syntax before on this my server and not had a problem.

My code is below: ....

View Replies !
Warning: Mail() [function.mail]: Permission Denied: Headers Injection
I wrote many years ago a small shop application as hobby for a customer. Worked well until a few days. I'm not a php guru and don't understand why I get now this permission problem.

Warning: mail() [function.mail]: Permission denied: headers injection (empty line) in /home/www/edfedca4df03c5ff2685003537a08dd5/web/minishop/mail.php on line
145

mail($this->to, $this->subject, "", $mime); <- LIGNE 145

View Replies !
Create A Script Which Sends A E-mail To The One Who Submitted The Form And A E-mail To The Webmaster (me).
I'm trying to create a script which sends a e-mail to the one who submitted the form and a e-mail to the webmaster (me). It also has to put the submitted info into my MySQL database. I'm just a beginner with PHP, so I don't know what could be wrong. When I try to submit the form, it gives me this error:

Parse error: parse error, unexpected T_VARIABLE in /home/example/public_html/test3/verwerken.php on line 38.

View Replies !
Warning: Mail() [function.mail]: SMTP Server Response: 550 5.7.1
I'm making e-mailing with php script and i setup mailtraq mailserver this thing is just a lil confusing to me first thing i want to know if i can use apache instead of this as mail server second when i wrote my script with that mail function i received an error this is it :

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for monalisa20042006@yahoo.com in D:wampwww1stmail.php on line 2

what's that mean if this means that the mail server not configured right...SO third how to use or configure this server to use as my mail server. Code:

View Replies !
Open User's Default E-mail Application To Generate An E-mail?
I want to be able to open up an user's default e-mail application and populate the to:, subject: , body:. I tried using the html <a href="maito:you@your.com?subject=Test&body=It worked">E-mail me</a> but it limits you to the length of the body. I want the user to be able to view the e-mail, add any other comments, and send it. Is this possible?

View Replies !
Warning: Mail() [function.mail]: Failed To Connect To Mailserver
Why do i keep getting this error:

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:wampwwwproject_upload Code:

View Replies !
Mail() Messages Bounce With 501 Syntax Error In MAIL FROM Command
I have this website that contains an internal message system that allows
users to send each other "email" messages. My client wants me to extend
the system so that when a user receives an internal message, the system
will send an actual email to the user's email address. Code:

View Replies !
Get The Mail Function To Send Mail After Processing My Forms Locally
I am using an Apple Mac Book Pro computer on which I am running MAMP (Macintosh, Apache, Mysql, PHP) I can not get the mail function to send mail after processing my forms locally. I checked the php.ini file to see what could be the problem and I believe I have it configured properly.

View Replies !
Warning: Mail() [function.mail]: SMTP Server Response: 553
my php.ini mail section is setup as follows:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

then in my php script:
<?php
mail("joecool@hotmail.com", "Testing", "Line 1
Line 2
Line 3", "From: tom@hotmail.com") or die("email error");
?>

i have also run mercury mail but i keep getting this error:

Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in C:Program Filesxampphtdocsest.php on line 2

on all tutorials that i went, the mail function is written this way what is wrong?

View Replies !
PHP Mail Not Sending Mail To Itnernal Email Address
Running a PHP mail script on Linux which has Exchange as the mail
server. The script does not send mail to any internal email address but sends
it to any other address outside its domain!

View Replies !
Sending HTML Mail To Outlook Express With Mail()
I'm sending out an HTML mailer using the mail() function in PHP. I'm appending all of the headers to the message. This message displays correctly in Hotmail, Outlook 2000, and even Mac's OSX mail client. But, for some reason, Outlook Expess (on Win XP & OSX) displays the HTML code and doesn't render it.

If, however, the recipient copies the HTML code and composes a new HTML message in Outlook Express, it gets sent correctly.

This particular user is also getting other HTML mailers that display correctly, so I know that the client is capable of accepting HTML mail.

I'm led to believe that PHP's mail() headers are not being interpreted correctly. In fact, they appear as the first 3 lines in the body of the message when viewed in Outlook Express. OK, here are some samples to tie this all together: First, the mail() code I'm using: PHP Code:

View Replies !
Emails Blocked By Certain Mail Hosts? (mail() Function)
I'm using mail($address,$subjectheading,$message,"From:
me@mysite.com") to send emails from my site. For the most part, it
works okay (for example, I receive the mail in my Yahoo box). But when
I check my university email, the message is not delivered. I thought
maybe it was because I had included my web address in the subject
heading and that it was being filtered out, but I removed that from
the subject and it still fails to get through. I'm making a wedding
site for some friends now and they want to be able to email everyone
on their guest list at once, but I'm afraid the same will happen to
some of these addresses as well. Any comments/suggestions on what may
be blocking the mail and how I can get around it? I'm not trying to
send out any kind of mass ad mailings or anything. Just to people on a
mailing list for this site.

View Replies !
Mail Function :: Send Form In HTML Mail
I am trying to use the PHP mail function to repopulate the information that has been filled out on a form and send the form out in an html email the same way that it looked when the individual filled it out. The problem I am having is with the Radio buttons and repopulating them. Code:

View Replies !
Mail() [function.mail]: Failed To Connect To Mailserver
i need to know how to enable my mail function i have change my ini to localhost port 25 and enabled emnail but nothing is changing anyone experienced this problem before.

View Replies !
Php Mail() Function Doesn't Send To Pop3 Mail Address
I'm writing a registration script for een webhosting company but the mail() function i used works only for hotmail addresses and not for pop3 email accounts, it also works for other not pop3 email accounts, does any one know what i should do to make this work. I used the same method before on an other server and there it worked perfectly.

View Replies !
Recieve A Mail Based On The Mail That Is Added On The Form
I am creating a php form which is connected with Mysql data

The thing I want to do is after the user press on submit button first redirect to a new page "booking_details.php" and the same time to recieve a mail based on the mail that he added on the form

I do not know php code so I do not know how to edit my page.

View Replies !
Sending Mail In Omni HTTPd With Mail()
Whenever I try and use the mail function I get a "Failed to Connect" error. I'm running PHP4.0, Omni Httpd 2.06 on Win98. Is there something else I have to do to enable email? I know if worked before on PWS, but I switched because I couldn't get PHP4 to run under PWS. Any help is greatly appreciated.

View Replies !
Sending Mail Without The Mail Client Popping Up
I was wondering how to send a mail without the mail client popping up to the user.

I want to send a mail to myself, when a user pushes a button on my homepage. Any ideas?

View Replies !
Why Does Mail() Only Send Messages To Some E-mail Addresses?
I've got a form that I use to collect information and store it in a MySQL database and use PHP to send a mail() message confirming registration. When I use my work e-mail address, I never receive the message, but when I use my home e-mail address, I get it right away. What am I doing wrong?

View Replies !
Mail Form Not Sending Mail - Server2003
I am trying to test a simple feedback form. I have php 5.0.3.3 on my dev
Windows server 2003. SMTP is working fine, as we all use it to send mail
from. PHP works fine as well, but I just cant get mail sent by php, although
no errors are reported.

Do I understand it correctly that this simple script should send me a mail?
This is just to test that it works.

<?php
mail('me@whatever.com', 'My Subject', 'message');
header( "Location: http://webserver/message_sent.htm" );
?>

Okay, the " Location: http://webserver/message_sent.htm" comes up fine, and
"<?php phpinfo() ?>" also works fine. SMTP allows relay from my subnet and
does not need authentication.

View Replies !
Mail() / Sendmail Sending Mail As Spam
Wondering if anybody knows why when sending mail through my local sendmail program using the PHP mail() function; emails either do not reach the destination, or register as spam? Prime example is: h0tm@il addresses never receive the email, gmail addresses consider the email to be spam, and my workplace receive the email about 1 hour after the program finishes.

Could it be a problem with my ISP? I am using Fedora Core 6, PHP 5 and Apache 2. Or test it yourself.. just fill out the form with some rubbish and it should send an email saying you've registered.. maybe you can figure out where I am going wrong by looking at the headers? http://aaronweb.no-ip.com:6969/?p=2

View Replies !
PHP Mail() Function Failing To Send Mail
Our setup: PHP 4.3.11, FreeBSD 5.3 RELEASE, Sendmail 8.1, 1 host
environment, 2 jails.

Our problem: While we can send email from the command line just fine
in one of the jails, we cannot use the php mail() command to send email
using sendmail at all. The function, when executed, does absolutely
nothing. No error, no reports to the maillog, nothing.

I've read somewhere that it's "not possible" to send mail using the php
mail() function within a freebsd jail, but i'm nearly certain we have
it working this way on another server, but can't seem to figure out the
issue.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved