php-general Digest 9 Mar 2010 11:10:23 -0000 Issue 6629
Topics (messages 302622 through 302629):
Re: Mail Function In PHP
302622 by: james.stojan.gmail.com
EHLO error 554: what can it be?
302623 by: Andre Polykanine
302626 by: Kevin Kinsey
Re: Anyone good with multiple SSL on Apache?
302624 by: Kim Madsen
302625 by: Daniel Egeberg
Re: best way to determine (MIME) content type of a stream ofbytes?
302627 by: Auke van Slooten
how to capture INF return from exp()
302628 by: Info
302629 by: Daniel Egeberg
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
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: Kannan<kanna...@gmail.com>
Cc: <php-gene...@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', 'xxxxxx'); 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=ZEND002498&r=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
--- End Message ---
--- Begin Message ---
Hello everyone,
I'm writing a class to send mail via an SMTP server with authorization.
Everything seems to work but I get an EHLO error:
554 SMTP synchronization error
Where should I look to avoid this?
Thanks!
--
With best regards from Ukraine,
Andre
Http://oire.org/ - The Fantasy blogs of Oire
Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @
jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: http://twitter.com/m_elensule
--- End Message ---
--- Begin Message ---
Andre Polykanine wrote:
Hello everyone,
I'm writing a class to send mail via an SMTP server with authorization.
Everything seems to work but I get an EHLO error:
554 SMTP synchronization error
Where should I look to avoid this?
Thanks!
Be polite :-D
Make sure your class waits for the other server's greeting
before you send HELO/EHLO. ;-)
HTH,
Kevin Kinsey
--- End Message ---
--- Begin Message ---
Skip Evans wrote on 08/03/2010 23:21:
D'oh!
...and I suppose there is just no way around that, eh?
two public IPs pointing to the same server? ;o)
--
Kind regards
Kim Emax - masterminds.dk
--- End Message ---
--- Begin Message ---
On Mon, Mar 8, 2010 at 23:21, Skip Evans <s...@bigskypenguin.com> wrote:
> D'oh!
>
> ...and I suppose there is just no way around that, eh?
>
> Skip
You can use SNI, but it's not supported by all web servers and browsers.
http://en.wikipedia.org/wiki/Server_Name_Indication
--
Daniel Egeberg
--- End Message ---
--- Begin Message ---
Robert P. J. Day wrote:
On Mon, 8 Mar 2010, Ashley Sheridan wrote:
What about writing the first n bytes to a file and then passing that
to the command line? I'm assuming a Linux server here, but it should
do the trick.
gaaaaah! i was hoping for something that wouldn't make me want to
gouge out my eyes with a soup spoon. :-)
Maybe slightly less painfull, you can always write your own 'mimemagic'
detection method. The magic.mime file is relatively easy to parse. This
is the route we took some years ago to make our mime detection OS
independant. We've made a php script which parses the mime.types file
and the magic.mime file and it generates a php module which uses that
information to figure out the correct mimetype.
The resulting php module has a large array, which looks like this:
...
$mimemagic_data[0][4]["\0\0\1\273"]="video/mpeg";
$mimemagic_data[0][4]["\0\0\2\0"]="application/x-123";
$mimemagic_data[0][4]["\0\0\32\0"]="application/x-123";
$mimemagic_data[0][4]["\0\6\25\141"]="application/x-dbm";
$mimemagic_data[0][4]["\101\104\111\106"]="audio/X-HX-AAC-ADIF";
$mimemagic_data[0][4]["\103\120\103\262"]="image/x-cpi";
...
with the first key as the offset to start, the next key is the length of
the snippet to check (I guess that could have been skipped...) and the
final key is the exact string to match.
The magic.mime file is no magic bullet though, there are occasions when
it won't match with a file, but that's usually with more complex types
like microsoft office documents, not with images.
If you're interested, the mimemagic module can be found here:
http://svn.muze.nl/trunk/lib/modules/mod_mimemagic.php?revision=4299&root=ariadne-php5
And the builder script (which you should run on a unix system with
magic.mime and mime.types file) is here:
http://svn.muze.nl/trunk/bin/utils/build_mimemagic_script.php?revision=4299&root=ariadne-php5
Hope this helps,
Auke van Slooten
Muze
--- End Message ---
--- Begin Message ---
Hello List,
I am using the math function exp( $arg )
http://php.net/exp
... using argument values ranging between 0 to 1500.
When I get into larger numbers, such as 750, the function returns an
undocumented "INF".
Presumably the "INF" means the number exceeds processing capacity. It would
be nice to know the official explanation.
At any rate, I want to capture the "INF" so that I can indicate to my users,
in a friendlier manner, that capacity is exceeded.
How?
Please also cc my address on your reply, with thanks,
Sincerely,
Esteban
1888Software.com S.A.
Software Powers the Net
WWW: http://1888Software.com
Email: 1888softw...@gmail.com
--- End Message ---
--- Begin Message ---
On Tue, Mar 9, 2010 at 11:00, Info <1888softw...@gmail.com> wrote:
> Hello List,
> I am using the math function exp( $arg )
>
> http://php.net/exp
>
> ... using argument values ranging between 0 to 1500.
>
> When I get into larger numbers, such as 750, the function returns an
> undocumented "INF".
> Presumably the "INF" means the number exceeds processing capacity. It would
> be nice to know the official explanation.
>
> At any rate, I want to capture the "INF" so that I can indicate to my users,
> in a friendlier manner, that capacity is exceeded.
>
> How?
>
> Please also cc my address on your reply, with thanks,
>
> Sincerely,
> Esteban
>
> 1888Software.com S.A.
> Software Powers the Net
> WWW: http://1888Software.com
> Email: 1888softw...@gmail.com
>
You can use the is_infinite() function. It's not entirely undocumented
though. See http://php.net/float. Basically you'll get INF when you
exceed the range according to the IEEE floating point standard.
--
Daniel Egeberg
--- End Message ---