Web Hosting Talk







View Full Version : Tiny PHP Work


DiverseFlow
04-09-2005, 07:47 AM
Alright, I'm currently developing a new free image hosting site 'http://axisfoto.com' and the script is pretty much complete (except a few admin backend things). One thing that isn't complete, is the mail function.

The server I am currently on requires SMTP authentication before E-Mails can be sent.

My current function is this;
function email($_TO, $_SUBJECT, $_MESSAGE)
{
$_HEADERS = "From: support@axisfoto.com";
mail($_TO, $_SUBJECT, $_MESSAGE, $_HEADERS);
}
I need that turned into a working function, but, the pages I call the function on, should ONLY have to call email() and ONLY have to use the strings defined in the function (To, Subject, Message).

This isn't very hard PHP work, I will pay $15 USD via PayPal for the job's completion.

Due to the high sensitivity of my script, you will only be given the current function, you must turn that into a fully working SMTP e-mailer, complete with SMTP authentication details (e.g. password, username, host) that I may enter later.

if you KNOW you can do this job and HAVE done one similar before, please reply to this thread and say you can do it, and then E-Mail me at admin@winaxis.com. I dont want 50,000 requests, only respond if you CAN do it, WITHIN 24 hours of the job start, CAN accept PayPal and this CANT be the first time you've done one of these scripts!!!

If you E-Mail me asking 'Can you pay me any way other than PayPal' or 'I haven't done it before, but ...' or 'I can do it, but not within 24 hours' or any sob stories, I wont hear it, $15 is the price, no less, no more.

Please don't look at what i've just said as being very negative or think of me as a person who's hard to work with because what i've said above, however, every time i post a thread for a little bit of PHP work, i get 10 - 20 responses within 5 minutes of people who have never done it before, or try and negotiate when i dont really want to mess around.

CompuTech
04-09-2005, 08:47 AM
Use something like this:


function mail($to,$subject,$message)
{
$headers = "From support@axisfoto.com";
mail($to,$subject,$message,$headers) or die("Cannot send email.");
}


If you need more help contact me at joelscaria@gmail.com. I'll be around in the afternoon (EST, GMT -500).

Hope this helps.

bloodranger
04-09-2005, 09:03 AM
lol...
i think that is defenitly not what he wants..

CompuTech
04-09-2005, 09:13 AM
Originally posted by The Kid Scareya

function mail($to,$subject,$message)



I made a typo - should be this:

function email($to,$subject,$message)


Originally posted by bloodranger
i think that is defenitly not what he wants..


What do you think he wants?

NickDev
04-09-2005, 09:21 AM
I think he wants a mail script that authorizes and uses his SMTP server to send email, If you still need this done, Feel free to PM me.

DiverseFlow
04-09-2005, 10:27 PM
Oh my WTF. Is The Kid totally out of it? I said SMTP authentication, I said, my current function, which is exactly what you said i should use, doesn't work and says my SMTP server requires authentication.

pstation
04-09-2005, 11:05 PM
Check out the PEAR SMTP package, i believe it supports SMTP authencation

http://pear.php.net/package/Net_SMTP
http://www.indelible.org/pear/Net_SMTP/guide.php

DiverseFlow
04-10-2005, 01:17 AM
PEAR Doesn't work for some reason, entered everything, getting the error;
Unable to add recipient : Invalid response code received from server

It may be because the server is a windows server.

stormraven
04-10-2005, 09:55 AM
I always use PHPMailer (phpmailer.sourceforge.net) - I _know_ it supports PHP Authentication - and I've used it on a Windows server before. Let me know if you still need help with it; I'm sure I can get you set up if you want to go that route.

DiverseFlow
04-10-2005, 10:31 AM
I've tried using PHPMailer, even with a guide I got from PHPFreaks, and i can NEVER get it to work. There are no instructions on how to implement it into a function, so that you ONLY need to call the function, I dont really wanna add 25 lines of code to each of my pages (a lot) just so I can E-Mail. I'd rather purchase my own server and make it not require SMTP authentication.

DiverseFlow
04-10-2005, 11:32 AM
I NEED someone to set this all up, so I simply have to call my function ( email(to, subject, message); ) and it sends properly and via SMTP!

I have just finished coding my admin backend system and I basically have the green light to open the site, HOWEVER, before a user account can be activated, the user must confirm their E-Mail address, an E-Mail is sent with a secret link, it is kinda hard for them to receive this link and confirm their E-Mail address if the system never sends an E-Mail!!!

I will raise my price to $20, but, it's my FINAL offer!

pstation
04-10-2005, 11:27 PM
function sendMail($_TO, $_SUBJECT, $_MESSAGE){
require_once("Mail.php");

$recipients = $_TO;

$headers["From"] = "support@axisfoto.com";
$headers["To"] = $_TO;
$headers["Subject"] = $_SUBJECT;

$params["host"] = "smtp.server.goes.here";
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = "username";
$params["password"] = "password";

// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory("smtp", $params);

$mail_object->send($recipients, $headers, $_MESSAGE);
}

DiverseFlow
04-11-2005, 09:31 AM
Job has been completed successfully by Paul Embry everything works like a charm :)