Re: [PHP] Mail Function In PHP

2010-03-08 Thread james . stojan
Any volume of mail sent direct to mx records is a red flag for anti spammers 
and without an smtp spf dkim and rdns you are wasting your time. The logic is 
that only people sending spam would be sending direct to mx like that. Fair or 
not that is just how life works. Oh and most mail servers do check rdns spf 
etc. 

It is kind of pointless to send emails if they end up in the spam folder or 
worse don't get delivered at all. Do it right the first time use an smtp rdns 
and spf at the very least. 


Sent via BlackBerry from T-Mobile

-Original Message-
From: Richard Quadling rquadl...@googlemail.com
Date: Mon, 8 Mar 2010 10:21:53 
To: Kannankanna...@gmail.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] Mail Function In PHP
On 7 March 2010 04:54, Kannan kanna...@gmail.com wrote:
 Hello
           I am creating a application for our college using the
 php.In that i want to send mail to all who are all the list.

 For that i am just simply use the mail function in php without
 configuring any mail system in the system.But the mail didn't send.
 For sending the mails wat are requirements and if u have any tutorials
 send it to me?

 Thanks..










 --
 With regards,

 Kannan. R. P,
 Blog @: http://kannan4k.wordpress.com/

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



Contrary to popular belief, to send an email you do not need to have
your own SMTP server. All you need to know is the SMTP server
responsible for your recipients email.

This information is held as part of the domain registration details
and is known as the MX records (as I understand it).

PHP has a function called getmxrr() [1]. This allows you to supply a
domain name and get back the list of MX records suitable for handling
the SMTP mail.

This function wasn't available on Windows until recently, and I
created a userland version utilising Windows nslookup.exe program [2].

So, once you've got the list of SMTP servers for the domain you are
sending email to, you can use the ini_set('SMTP', 'xx'); function
to set the server to handle the mail() call you are about to make.

Upside : No local SMTP server - you are not responsible for
maintaining/administering/etc. any aspect of the SMTP process.
Upside : If the mail() call fails, you can try the other MX records (I
tend to sort the results based upon weight and try them in sequence).
If it fails all of them, you know straight away and can deal with it.
Upside : No relaying. No permission issues to worry about. You are
simply talking to the public SMTP servers just like any other SMTP
server or sender.

Downside : No queuing. Without a_LOCAL_ SMTP server, you can only
deal with sending email in real time.
Downside : One domain at a time. You cannot send email to
a...@domain1.com, b...@domain2.com_and_ c...@domain3.com in the 1 email.

None of these steps affect the use of mail() or a mail sending class
(phpmailer, RMail, html_mime_mail5, etc.).

Regards,

Richard.

[1] http://docs.php.net/getmxrr
[2] http://docs.php.net/getmxrr#53182

Richard.

-- 
-
Richard Quadling
Standing on the shoulders of some very clever giants!
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Mysql statement works in phpmyadmin but not in php page

2010-02-11 Thread james stojan
I'm at my wits end trying to make this mysql statement insert work in
PHP. I'm not getting any errors from PHP or mysql but the insert fails
(nothing is inserted) error reporting is on and is reporting other
errors. When I echo out the query and manually paste it into PHP
myAdmin the query inserts without a problem. I know that I am
connecting to the database as well part of the data being inserted
comes from the same database and that the mysql user has permission to
do inserts (even tried as root no luck).

$query=INSERT INTO upload_history (v_id,hour,visits,date) VALUES
(.$v_id.,.$hour.,.$visits.,'$date1'.);;

$r2=mysql_query($query) or die(bA fatal MySQL error
occured/b.\nbr /Query:  . $query . br /\nError: ( .
mysql_errno() . )  . mysql_error());

This is an echo of $query and runs in phpmyadmin.

INSERT INTO history (v_id,hour,visits,date) VALUES (45,0,59,'2010 01 27');


Any idea what is going on here?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mysql statement works in phpmyadmin but not in php page

2010-02-11 Thread james stojan
Thank you.
You were right on the money, hour was the problem and the tick marks
solved it. I spent 3 hours trying to figure out why I never got an error but
there was no insert and  php myadmin does add the tick marks automatically.
 Probably a good habit to always use the tick marks.

Learn something new everyday.

On Thu, Feb 11, 2010 at 4:26 PM, Joseph Thayne webad...@thaynefam.orgwrote:

 Try putting tick marks (`) around the field and table names.  So your SQL
 query would then look like:


 INSERT INTO `history` (`v_id`, `hour`, `visits`, `date`) VALUES (45, 0, 59,
 '2010 01 27');

 This is a good practice to get into.  The problem is that MySQL allows you
 to create tables and fields with the same name as functions.  If the tick
 marks are not there, then it assumes you mean to try using the function.  In
 your case, hour is a function in mysql.  I would assume that the reason it
 works in phpmyadmin is that it filters the query somehow to add the tick
 marks in.

 Joseph


 james stojan wrote:

 I'm at my wits end trying to make this mysql statement insert work in
 PHP. I'm not getting any errors from PHP or mysql but the insert fails
 (nothing is inserted) error reporting is on and is reporting other
 errors. When I echo out the query and manually paste it into PHP
 myAdmin the query inserts without a problem. I know that I am
 connecting to the database as well part of the data being inserted
 comes from the same database and that the mysql user has permission to
 do inserts (even tried as root no luck).

 $query=INSERT INTO upload_history (v_id,hour,visits,date) VALUES
 (.$v_id.,.$hour.,.$visits.,'$date1'.);;

 $r2=mysql_query($query) or die(bA fatal MySQL error
 occured/b.\nbr /Query:  . $query . br /\nError: ( .
 mysql_errno() . )  . mysql_error());

 This is an echo of $query and runs in phpmyadmin.

 INSERT INTO history (v_id,hour,visits,date) VALUES (45,0,59,'2010 01 27');


 Any idea what is going on here?






Re: [PHP] Good source for sample data?

2010-01-28 Thread james stojan
Fakenamegenerator.com is pretty good for these kinds of records, alot of
variety and can change order/formating for them but they do limit free
orders to 50k records.

http://www.fakenamegenerator.com/order.php

On Thu, Jan 28, 2010 at 8:06 PM, TG tg-...@gryffyndevelopment.com wrote:

 I remembered a coworker found an online resource that generated sample data
 for you.  I hit google and I think I found it:

 http://www.generatedata.com/

 I I found it on a list of resources for data generation:

 http://www.webresourcesdepot.com/test-sample-data-generators/


 I've never used any of these, but once again.. Google is your friend.

 -TG

 - Original Message -
 From: Brian Dunning br...@briandunning.com
 To: php-general@lists.php.net, my...@lists.mysql.com
 Date: Thu, 28 Jan 2010 15:52:41 -0800
 Subject: [PHP] Good source for sample data?

  Hey all -
 
  I need a few million sample contact records - name, company, address,
 email, web, phone, fax. ZIP codes and area codes and street addresses
 should be correct and properly formatted, but preferably not real people
 or companies or email addresses. But they'd work if you did address
 validation or mapping. Anyone have a suggestion?
 
  - Brian
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php