PDA

View Full Version : Email Application


harlequin2k5
02-21-2006, 03:24 AM
where would one find a tutorial or sample of an email application using php? or perhaps a book that addresses email apps?

the reason for this is that the owner of the site doesn't want his users to know what their email addresses are and they would receive their email from the website - otherwise I would just use the host's email app or outlook express

any thoughts or suggestions would be greatly appreciated!

_Aerospace_Eng_
02-21-2006, 03:29 AM
Hmm so are you wanting to send out like a newsletter or something. I'm sure what type of email app you are looking for. What will be the main purpose of the app?

chump2877
02-21-2006, 03:33 AM
These are both decent PHP e-mail apps that are opensource:

Horde Imp: http://www.horde.org/imp/

Squirrelmail: http://www.squirrelmail.org/

Personally, I like Horde better....

Resources for how to write PHP webmail applications are scarce (if you find a good one let me know! -- post it here :) )....Cooincidentally, I'm in the process of writing a PHP webmail application myself, and I've found it to be quite a project...I recommend using one of the existing open source solutions and save yourself the headache..;)

StupidRalph
02-21-2006, 03:34 AM
The mail function in PHP is pretty straight forward. Something like this.
$to = "user@domain.com";
$subject = "Welcome to the site";
$body = "I just wanted to thank you for signing up to the site. Enjoy!";
If (mail($to,$subject,$body)) {
echo "Your message has been sent sucessfully";
}
else {
echo "You message could not be delivered";
}
There is also an optional additional parameter so you could also for additional headers".

harlequin2k5
02-21-2006, 03:36 AM
you're just all over the place tonight Aero! :)

for users to be able to send messages to each other - kinda like using the pm's here but there may be occasions when an email has to go outside the domain

in other words - the owner doesn't want for the users of the site to abuse their email with non-company email and I just figgered that if we employed an email application within the website we might be able to assuage some of that

does that make any sense? did you have another thought on how to achieve that?

StupidRalph
02-21-2006, 03:36 AM
After reading chump's post...I kinda agree. I remember running into problems about being able to relay my mail. And a few other problems i can't think of right now.

harlequin2k5
02-21-2006, 03:38 AM
The mail function in PHP is pretty straight forward. Something like this.
$to = user@domain.com;
$subject = "Welcome to the site";
$body = "I just wanted to thank you for signing up to the site. Enjoy!";
If (mail($to,$subject,$body)) {
echo "Your message has been sent sucessfully";
}
else {
echo "You message could not be delivered";
}
There is also an optional additional parameter so you could also for additional headers".
Yes - however, I'd like for the users to also be able to receive their email through the website

harlequin2k5
02-21-2006, 03:40 AM
I guess there's no real way to do that either when I think about it

if a user signs up for an account with pogo their email address would show to pogo and if the user was then able to receive their email then they'd still be able to do the confirmation thing

ok - back to square one for that I guess - no real easy to way to accomplish that unless I was able to block receipt of all email except for just the few associated domains that would be acceptable