email function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
mustafa
Forum Newbie
Posts: 3
Joined: Mon Jun 30, 2003 3:39 am
Location: pakistan

email function

Post by mustafa »

how can i relay mail form a web server to an externel mail server.


i am using linux server

my code is:
<?php

include("dbconfig.php");

$subject=$HTTP_POST_VARS['subject'];

$email=$HTTP_POST_VARS['email'];

$inquiry=$HTTP_POST_VARS['inquiry'];

$query="insert into inquiry (mi_subject,mi_mail,mi_inquiry,mi_repliedinq) values ('$subject','$email','$inquiry',0)";

$result=mysql_query($query);

mail($email,$inquiry,$query,"from:mth52@yahoo.com");

?>
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Are you getting an error message with your code? Is something working/not working as it shouldn't/should?

Mac
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Try and keep all posts on one topic in the same thread, cross-posting makes me sad :cry:

viewtopic.php?t=10247

Mac
Locked