PHP mail trough ISP SMTP W/O acces to cfg on server

OK, i’m newbie, but so far i 've seen so much code listing how to send mail trough mail(), i’ve seen somewhere that i can use socket_mail, but isn’t listed in PHP manual or functions, any one knows HITH I can send mail from my page using my ISP’s mail account? ( wich is different from my WHSP ) ,
and on top of all that i don’t have acces to php.ini on my WHSP server’s ( actually I haven’t acces at all, besides puting files there Via FTP), an example would be GREATLY appreciatted. thanx in advance.

p.s. excuse me 4 my really bad english.

let me make sure i understand you (the alphabet soup is throwing me off). is WHSP = web hosting service provider? If so - then your web hoster does not give you access to a mail sending program on the server - right? (don’t know - ask) So you want to know how to send mail from your site/computer with out it. Correct?

I’m not an expert in this kind of stuff but I beleive if it is a site that will not allow you to load a smtp program you are SOL (shucks out of luck). If you can load the program check out this string ( … highlight= ) for a direction on SMTP/email and the PHP functions for sockets is here (

Well, first of all, i appreciatte ur kindness replying to my post, secondly, i told u forgiveme 4 my bad english, english is NOT my mother thonge.

And yes i’m way out of luck, actually i think my WHSP ( yes it means that ), really sux, ( can’t argue with da boss, can I? :evil: )

About da links u kindly gave me, i’ve already check 'em out, da smtp app dosent work 'cause it’s an .exe file, i haven’t acces at all to da "·$% server, i’m just allowed 2 put files there, nothing else. ( i even can’t chmod anything ) so the same applies to the mail() function, i can’t modifing ( as a matter of fact i even can’t c it ) da php.ini, and again, yes i’m TFU w/ my WHSP ( vive le windows, rigth? ). and i haven’t found no function in the second link wich allow me to send mail.

Is there somethng, say mail(), or wichever other function where i can specify host, username, pwd, port, and all that stuff, so i can mail trough my ISP’s directly from my php code?

Thanx again in advance & forgiveme 4 da bad english.

Please your slang is killing me (u = you, da = the, 2 = to, etc. ). I’m not asking for proper English just please lay off the slang. Bad English I can handle - slang I can’t.

You can answer your own question about mail() by simply looking in the manual (It is translated into ~ 20 languages, one of which is Spanish). As for the sockets they don’t send mail in themselves, but they will allow you to connect to a SMTP server (your ISP for example) and create a dialog.

Granted you will have to do some research on what the dialog should look like and consist of but that is what Google is for as well as books on writing Internet email. I have 2 - one from O’Reilly and the other from Digital Press. I would tell you how to do it but there is a lot of other concepts that must be understood to trully get it and do it correctly.

Good Luck!

Granted. :oops:

Well, let’s make things straigth here, ( take no harm ) i WOULDN’T use this forums if i haven’t try other options first. as a linux user i have learned the search-first-read-more then-ask lesson.

Shure, the php manual is spanish too, but neither the spanish or english version have anything about it, they state;

The behaviour of these functions is affected by settings in php.ini.
remember i haven’t acces to anything besides just putting files there.

Somehow, soemewhere came out w/this;

[code] <?php

$recipients = ‘[email protected]’;
$headers[‘From’] = ‘[email protected]’;
$headers[‘To’] = ‘[email protected]’;
$headers[‘Subject’] = ‘Test message’;
$body = ‘Test message’;

$params[‘host’] = ‘’;
$params[‘auth’] = TRUE;
$params[‘username’] = ‘cjm’;
$params[‘password’] = ‘mypass’;
$params[‘port’] = ‘25’;

$mail_object =& Mail::factory(‘smtp’, $params);
$mail_object->send($recipients, $headers, $body);


I can figured out almost everything but the $mail_object lines, what are those? wich function they belong to?, also the =& Mail::factory part is thrilling me, can u help me w/ those? thanx in advance for your kindly help.

once again, forgive me for my bad english, ( TV’s fault )

I am not even going to begin to try and explain (or figure out) the function that you presetned.

I will however say this… I just did a google search for mail.php
and one of the top 5 hits was this link:

Poking around that page tells me that what you are looking for (in the code you presented) is a function of PEAR (see the above page). This too is probably not much help to your situation as you apparently only have access to your directories and don’t have the ability to install.

That being said, you could investigate PEAR more and perhaps look at how it’s doing what it needs to, and include those files in your directories.

Good Luck.
Hope this helps.

YEAH!!! :stuck_out_tongue: )but defenitely it’s what i was looking 4, Thanx a lot.

to whom this may be handy; PEAR is installed ( basic files ) rigth into PHP’s core, >= V. 4.3.4 so u don’t need to install anything it’s already there, and the function is mail::factory(), take a look at, thanx to guys that help me.

BTW: PEAR isn’t in PHP manual.

Sponsor our Newsletter | Privacy Policy | Terms of Service