Jump to content

Auto Mail Responder

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
15 replies to this topic

#1
intraining

intraining

    Newbie

  • Members
  • Pip
  • 8 posts
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

#2
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
1. You want to use this function: PHP: mail - Manual
2. Yes.

#3
intraining

intraining

    Newbie

  • Members
  • Pip
  • 8 posts
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
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
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
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
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
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
intraining

intraining

    Newbie

  • Members
  • Pip
  • 8 posts
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?

#7
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts

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.
PEAR :: The PHP Extension and Application Repository

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
intraining

intraining

    Newbie

  • Members
  • Pip
  • 8 posts
i see..i am using joomla! the content management system and is it that it has already been installed together with it already?

#9
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
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
intraining

intraining

    Newbie

  • Members
  • Pip
  • 8 posts
the mail function will work right away? do you mean in joomla! or on its own without joomla!?

#11
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
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
intraining

intraining

    Newbie

  • Members
  • Pip
  • 8 posts
<?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.