3 Replies - 839 Views - Last Post: 24 August 2008 - 03:30 PM Rate Topic: -----

#1 Guest_NIXZ*


Reputation:

How can i send an email?

Posted 24 August 2008 - 04:34 AM

I've strugled a lot trying to find the code for .php file to be able to send an email to someone@something.com the only thing that i have found is: mailto:someone@something.com but that works as a url...
lets say that you want to fill a comment textbox and a checkbox that says male/female how can i send those variables to an email as:
comment: coment from textbox here depents on what he have written
type: variable here male or female depents on what he checked
the same way you send an activation email or a newsletter email...

but since i dont have a server i want to add this to an html file:
$_GET['comment'];
$_GET['type'];
idk...

This post has been edited by NIXZ: 24 August 2008 - 05:12 AM


Is This A Good Question/Topic? 0

Replies To: How can i send an email?

#2 ghqwerty  Icon User is offline

  • if($spareTime > 0){ $this->writeCode(); }
  • member icon

Reputation: 43
  • View blog
  • Posts: 903
  • Joined: 08-August 08

Re: How can i send an email?

Posted 24 August 2008 - 05:27 AM

you wont be able to do that without php ...

im not completely sure how to do it but im guessing you would have to send it ith 2 php lines saying

<?php echo $comment; ?>
<br>
<?php echo $sex; ?>

this would mean making the comment and sex into variables .. im not sure how to add them to an email though sorry
Was This Post Helpful? 0
  • +
  • -

#3 Moonbat  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 36
  • View blog
  • Posts: 424
  • Joined: 30-June 08

Re: How can i send an email?

Posted 24 August 2008 - 07:01 AM

You would use PHP's mail() function.
Was This Post Helpful? 0
  • +
  • -

#4 chili5  Icon User is offline

  • D.I.C Lover

Reputation: 20
  • View blog
  • Posts: 1,144
  • Joined: 28-December 07

Re: How can i send an email?

Posted 24 August 2008 - 03:30 PM

You would need to use a mail function in PHP. You can't do this in HTML. HTML is just a markup language, and nothing more. :)

You need a mail server, and PHP or some other server-side programming language.

PHP mail() function is quite simple. :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1