|
Posted by Steve on 10/25/07 14:01
"phpCodeHead" <phpcodehead@gmail.com> wrote in message
news:1193316932.553981.240110@o38g2000hse.googlegroups.com...
> On Oct 24, 3:24 pm, "Steve" <no....@example.com> wrote:
>> "phpCodeHead" <phpcodeh...@gmail.com> wrote in message
>>
>> news:1193250040.807233.196970@q3g2000prf.googlegroups.com...
>>
>>
>>
>> > On Oct 24, 8:23 am, "Steve" <no....@example.com> wrote:
>> >> "phpCodeHead" <phpcodeh...@gmail.com> wrote in message
>>
>> >>news:1193230925.440570.29590@v23g2000prn.googlegroups.com...
>>
>> >> > On Oct 24, 7:13 am, Dev <hanu...@gmail.com> wrote:
>> >> >> Dear All,
>> >> >> I have created a website.
>> >> >> in the contact us page i want to send all information (Entered by
>> >> >> visitor in text boxex) directly to my e-mail address.
>> >> >> to do this i have no idea because i am new to PHP.
>> >> >> thanks in advance
>> >> >> Dev
>>
>> >> > To get you started -> http://us.php.net/manual/en/ref.mail.php
>>
>> >> > For the Mail functions to be available, PHP must have access to the
>> >> > sendmail binary on your system during compile time. If you use
>> >> > another
>> >> > mail program, such as qmail or postfix, be sure to use the
>> >> > appropriate
>> >> > sendmail wrappers that come with them. PHP will first look for
>> >> > sendmail in your PATH, and then in the following:
>> >> > /usr/bin:/usr/sbin:/
>> >> > usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have
>> >> > sendmail available from your PATH. Also, the user that compiled PHP
>> >> > must have permission to access the sendmail binary.
>>
>> >> well if that's just not about the dumbest thing i've ever heard!
>>
>> >> here's is a short function all in php. it works with IIS or with any
>> >> command-line mail program. fuck compiling in crap like that!
>>
>> >> <?
>> >> class email
>> >> {
>> >> static function send(
>> >> $to ,
>> >> $from ,
>> >> $cc = '' ,
>> >> $bcc = '' ,
>> >> $subject ,
>> >> $text = '' ,
>> >> $html = '' ,
>> >> $companyName = '' ,
>> >> $logo = null ,
>> >> $dropDirectory = '' ,
>> >> $exec = '' ,
>> >> $execOptions = ''
>> >> )
>> >> {
>> >> $messageHtml = $html;
>> >> $html = '
>> >> <html>
>> >> <style>
>> >> body
>> >> {
>> >> background-color : white;
>> >> color : black;
>> >> font-family : verdana, tahoma, arial,
>> >> times
>> >> new
>> >> roman, sans-serif;
>> >> font-size : 8pt;
>> >> margin : 0px;
>> >> text-align : left;
>> >> }
>> >> </style>
>> >> <body>
>> >> ';
>> >> if (isset($logo))
>> >> {
>> >> $image = file_get_contents($logo);
>> >> $image = chunk_split(base64_encode($image));
>> >> $html .= '
>> >> <img alt="' . $companyName . '" border="0px"
>> >> src="cid:logo" style="float:right;">
>> >> <br>
>> >> <br>
>> >> <br>
>> >> <br clear="all">
>> >> ';
>> >> }
>> >> if ($messageHtml == ''){ $messageHtml = '<html><body>' . $text; }
>> >> $html .= $messageHtml . '</body></html>';
>> >> if ($text == ''){ $text = $html; }
>> >> $boundry = '----=' . md5(uniqid(rand()));
>> >> $related = '----=' . md5(uniqid(rand()));
>> >> $mail = "MIME-Version: 1.0\r\n";
>> >> $mail .= "TO: " . $to . "\r\n";
>> >> $mail .= "FROM: " . $from . "\r\n";
>> >> $mail .= "CC: " . $cc . "\r\n";
>> >> $mail .= "BCC: " . $bcc . "\r\n";
>> >> $mail .= "Subject: " . $subject . "\r\n";
>> >> $mail .= "Content-Type: multipart/related;
>> >> boundary=\"$related\"\r\n\r\n\r\n";
>> >> $mail .= "--$related\r\n";
>> >> $mail .= "Content-Type: multipart/alternative;
>> >> boundary=\"$boundry\"\r\n\r\n\r\n";
>> >> $mail .= "--$boundry\r\n";
>> >> $mail .= "Content-Type: text/plain;
>> >> charset=\"iso-8859-1\"\r\n";
>> >> $mail .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
>> >> $mail .= $text . "\r\n\r\n";
>> >> $mail .= "--$boundry\r\n";
>> >> $mail .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n";
>> >> $mail .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
>> >> $mail .= $html . "\r\n\r\n";
>> >> $mail .= "--$boundry--\r\n\r\n";
>> >> $mail .= "--$related\r\n";
>> >> $mail .= "Content-Type: image/jpeg\r\n";
>> >> $mail .= "Content-ID: logo\r\n";
>> >> $mail .= "Content-Disposition: attachment;
>> >> filename=\"logo.jpg\"\r\n";
>> >> $mail .= "Content-Transfer-Encoding: base64\r\n\r\n";
>> >> $mail .= $image . "\r\n\r\n";
>> >> $mail .= "--$related--\r\n\r\n";
>> >> $mail .= "-- End --\r\n";
>> >> $fileName = $dropDirectory . strtoupper(md5(uniqid(rand()))) .
>> >> '.eml';
>> >> file_put_contents($fileName, $mail);
>> >> if (!$exec){ return $mail; }
>> >> exec($exec . $fileName . $execOptions);
>> >> @unlink($fileName);
>> >> return $mail;
>> >> }}
>>
>> >> ?>
>>
>> >> not that hard now, is it?
>>
>> > In regards to the op's post, yes it is!!! roflmao! Jeez! Lighten
>> > up...
>>
>> > I was merely pointing the op to resources for *learning* how to solve
>> > his problem like most ppl use the newsgroups for.
>>
>> you did no such thing actually. you described a very obtuse process for
>> integrating a third-party email tool into php...such that php must be
>> compiled with it. first, that's not platform independant. second, it's
>> ludicrous! you think a noob php developer knows the first god damned
>> thing
>> about compiling php...much less including third-party add-ons in the
>> mix?!!
>>
>> a suggesting to either RTFM or google would have sufficed much more
>> nicely.
>>
>> > I didn't realize one
>> > could just post problematic issues here, go home, beat the wife and
>> > kids, then come back to work the next day, check the newsgroups and
>> > viola! someone has written my problematic code for me. For free!
>>
>> how you treat your wife and kids is up to you and of little concern to
>> me.
>>
>> and, if ever i saw a hole in php it would be in the venue of email.
>> further,
>> if i've been using this solution for years - minus the compiling shit
>> suggestion, plus platform independence - is it really killing me to post
>> that code, as brief yet helpful as it is?
>>
>> i get paid enough. i tell people to RTFM tons. i don't do that for
>> certain
>> topics, email being one.
>>
>> > Take 10 deep breaths and learn this one thing before you die: Cook for
>> > a man, feed him for a day; teach a man to fish, feed him for a
>> > lifetime.
>>
>> two things...conventional wisdom is only convenient and acceptible
>> because
>> it is more comforting than truthful. finally, i'll feed whomever i
>> please. i
>> am at no point obligated to continue to do so. duh!
>
> i don't beat my wife at all; never have, never will...
well then, why bring it up...especially since you aren't even witty enough
to make it read as if *i* beat my kids or something. here's some
conventional wisdom for you..."from the abundance of the heart, the mouth
speaks." i guess that means you just *want* to beat your wife and kids.
> but, i'm not
> thrown off by the fact that it's the one thing in that paragraph that
> hit your mind enough to feel obligated to puke ignorance through you
> keyboard and onto this post.
hmmmm...you make a sweeping statement trying (emphasis) to be a sarcastic
smart-ass and lead it off with "beat my [your] wife and kids..."? how is the
fact that you ran on at the mouth for a paragraph and i noticed it, and
responded with ONE SENTENCE - how is that equal to *over-noticing*?
you're funny.
> i will teach whomever i please. i am at no point obligated just the
> same! double duh!
>
> you have no concept of wisdom, conventional or otherwise; i've
> researched your posts across the internet, most simply stem
> controversy and put other ppl down
again, funny! yeah, at least i directly address the statements you make with
counters that apply. using ad-homonyms means you lose. remember, you said
"feed, man, one day; teach, fish, fed, forever"? my counter was "feed/teach
whomever; doesn't mean i have to do either". keep on task, will you!
> ... and this is ok for the likes of
> you and ppl like you;
i love your voice. it would kinda fit in with other phrases of the early 20
century...like, "why i outta"...i'm thinking curly, or maybe even moe. rof!
> but, as far as about 98% of the rest of the
> population goes we're just not on board with you.
really? that's because (on average) each person only meets around 2K people
in a lifetime. and, given that there are 4B+ people, it's not hard to
imagine that just about any deck on which any one of us stand that we will
do so alone, in the site of those statistics. however, you have no idea
where the 2K people i know stand. for all you know, 100% of them may also
agree that you suggestion is D.U.M.B. now those are numbers worth talking
about.
as it is, you are throwing a big juicy red-herring out there. don't try to
divert the subject to 'other' posts. deal with the one at hand. otherwise,
you just look silly. then again, i see you are wont to such behavior given
your initial 'solution' to the op.
> over and out on this convo -- gone fishing!
convo? over-and-out? wtf?
ok, burt.
btw, 'gone fishing' is most likely what people read when casting a glance
your way. (see, now that's ad-homonym...but AFTER i directly counter your
arguments)
[Back to original message]
|