Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Closed Thread
How to send email using php?
Old 02-05-2008, 03:17 PM How to send email using php?
Junior Talker

Posts: 4
Trades: 0
How can we use php to send email to the given email list..
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
john3teen is offline
View Public Profile
 
 
Register now for full access!
Old 02-05-2008, 04:07 PM Re: How to send email using php?
amw_drizz's Avatar
Ultra Talker

Posts: 340
Name: Jon
Location: New York
Trades: 0
how are you getting the list? database? file? thin air?

for a db
PHP Code:
// Message information
$message "Custom Message/n"// forget if it is /n or \n for new line
$message .= "Custom message continued";
$from "example@example.com"
$subject "MY MAIL LIST";
// get email from db
$subres "SELECT * FROM email ";
$res mysql_query($subres);
$data mysql_fetch_assoc($res);

do{
// mail function here
mail ($data['email'],$subject,$message);
}
while(
$data mysql_fetch_assoc($res)); 
thats for a db, i dont know about getting it from files and what not.
__________________
AMW_Drizz
Dev Machine:: Apache 2.2.6 PHP 5.2.6 MySQL 5.1
amw_drizz is offline
View Public Profile Visit amw_drizz's homepage!
 
Old 02-06-2008, 07:08 AM Re: How to send email using php?
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
phpmailer class
and do not try to reinvent the wheel
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
View Public Profile Visit mtishetsky's homepage!
 
Old 02-07-2008, 12:32 PM Re: How to send email using php?
Junior Talker

Posts: 1
Trades: 0
Note that some hosts (mainly free ones) have disabled the usage of the mail() function.
matt2224 is offline
View Public Profile
 
Old 02-08-2008, 01:56 AM Re: How to send email using php?
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
That is what I am talking about. With phpmailer you can send emails through sockets with authorization, in particular through your registered mailbox.

Though if the hoster has also disabled sockets then you will not be able to send mail by php anyway.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
View Public Profile Visit mtishetsky's homepage!
 
Old 02-09-2008, 02:01 PM Re: How to send email using php?
amw_drizz's Avatar
Ultra Talker

Posts: 340
Name: Jon
Location: New York
Trades: 0
I just send simple emails, nothing from a db, so the mail(); works fine for me, hope you find what your looking for.
__________________
AMW_Drizz
Dev Machine:: Apache 2.2.6 PHP 5.2.6 MySQL 5.1
amw_drizz is offline
View Public Profile Visit amw_drizz's homepage!
 
Old 02-11-2008, 02:32 AM Re: How to send email using php?
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
It does not matter whether you send simple emails or anything from DB (how does the usage of DB relate to this question at all?). The main reason of using phpmailer is that phpmailer sets correct headers in your outgoing messages thus decreasing the probability of message going to spam box on most free mail servers like hotmail or yahoo or whatever. Some phpmailer-made messages can still go into spam box, but handmade message with improper headers will go there much more likely.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
View Public Profile Visit mtishetsky's homepage!
 
Old 02-11-2008, 03:35 PM Re: How to send email using php?
Novice Talker

Posts: 8
Trades: 0
http://phpmailer.codeworxtech.com/ you gotta love this, it also supports sending via an smtp
WebHostingNerds is offline
View Public Profile Visit WebHostingNerds's homepage!
 
Closed Thread     « Reply to How to send email using php?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.09691 seconds with 12 queries