|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How Do I Use mail($To, $Subject, $Message) Function Inside Class?
How Do I Use mail($To, $Subject, $Message) Function Inside Class?
Folks; Below is a class that I am working on. The html form on Page One below outputs the $Email, $About, and $Data variables. The class script on Page Two processes the input information. At the present time the script on Page Two processes the $Email, $About, and $Data input variables and assigns the values to $Variable1, $Variable2, and $Variable3, respectively. The values are then passed to the "SetAddress", "SetAddress2", and "SetAddress3" functions. And finally, the values are output in the browser window via the SendMail() function with the "$this->To", "$this->Subject", and "$this->Message" snippets as shown below. But the functionality stops there. I need to go one step further and input the "$this->To", "$this->Subject", and "$this->Message" values into the mail($To, $Subject, $Message) function. I've tried using the following: mail($this->To, $this->Subject, $this->Message) but it won't work. PHP Code:
I would appreciate any suggestions. Thank you in advance. |
|
#2
|
|||
|
|||
|
Scratch The Above
I've figured it out. The function mail($this->To, $this->Subject, $this->Message) does indeed work with the above code. The reason that I could not get it to work was because I forgot to put the semicolon ";" at the end of the function. In order to get the above scripting to work the mail function should have the semicolon like so: mail($this->To, $this->Subject, $this->Message); Sorry if I caused anybody any difficulty. If anyone can see a better way of writing the above code please feel free to post a reply. |
|
#3
|
||||
|
||||
|
heh, semi-colon's will get ya every time...
|
|
#4
|
|||
|
|||
|
|
|
#5
|
|||
|
|||
|
kimy_cool;
Thank you for your kind help. I'll study over the information at the phpguru.org link. It looks like that there are some good things there. Thanks again. Best Regards; Volitics |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > How Do I Use mail($To, $Subject, $Message) Function Inside Class? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|