Auto Mail Responder
Started by intraining, Oct 25 2008 05:34 AM
15 replies to this topic
#1
Posted 25 October 2008 - 05:34 AM
hi i would to create something like an auto resonder in my email.
This is how it should work.
1) there should be a link called for example "click here to inform the sender" and then when the reader clicks this link, it will generate a default email message and it will be sent to the sender. is this similar to activation code or something? how do i start?
2) the second thing is that i am using a content management system called Joomla!. can this script be working together with my CMS?
thanks in advance
This is how it should work.
1) there should be a link called for example "click here to inform the sender" and then when the reader clicks this link, it will generate a default email message and it will be sent to the sender. is this similar to activation code or something? how do i start?
2) the second thing is that i am using a content management system called Joomla!. can this script be working together with my CMS?
thanks in advance
|
|
|
#2
Posted 25 October 2008 - 05:55 AM
#3
Posted 25 October 2008 - 06:09 AM
i will read up on that manual and will get back again. By the Way another question, does php needs any medium for it to run? what i mean is that for example jsp need apache tomcat to work so does php need any?
#4
Posted 25 October 2008 - 12:51 PM
No medium perse, but mail() to work, PHP must have access to the sendmail binary (or whatever your server uses). However, In close to five years, I have yet to run across a server in which the mail function is prohibited.
#5
Posted 25 October 2008 - 07:07 PM
As John said. This could be done by simply using the mail() function.
If you don't understand it from PHP.net, just ask here and we will be willing to help you :D
If you don't understand it from PHP.net, just ask here and we will be willing to help you :D
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!
#6
Posted 26 October 2008 - 04:42 AM
thanks for all your help!
here is something i do not understand. What is PEAR Packages? Is this needed for the mail() function to work?
here is something i do not understand. What is PEAR Packages? Is this needed for the mail() function to work?
#7
Posted 26 October 2008 - 04:44 AM
Quote
PEAR is a framework and distribution system for reusable PHP components. You can find help using PEAR packages in the online manual and the FAQ.
No it is not required for mail(). That is a built-in function to PHP :D
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!
#8
Posted 26 October 2008 - 05:02 AM
i see..i am using joomla! the content management system and is it that it has already been installed together with it already?
#9
Posted 26 October 2008 - 05:04 AM
I don't know if PEAR is already installed with Joolma! But the mail() function will work straight away.
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!
#10
Posted 26 October 2008 - 05:05 AM
the mail function will work right away? do you mean in joomla! or on its own without joomla!?
#11
Posted 26 October 2008 - 05:09 AM
Both :D
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!
#12
Posted 26 October 2008 - 05:21 AM
<?php
require_once "mail.php";
$from = "shino_jm@hotmail.com";
$to = "taychorkhee@hotmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you? i want you to call me.";
$host = "mail.singnet.com.sg";
$username = "";
$password = "";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username',
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>
this is the code i am using, but i get this error that say Fatal error: Class 'Mail' not found in C:\Program Files\xampp\htdocs\mail.php on line 16
Edited by John, 26 October 2008 - 10:41 AM.


Sign In
Create Account

Back to top









