Help a newbee save my job !
Posted on
16th Feb 2014 07:03 pm by
admin
Hey guys i am dying here i am new to php and would like for someone to help me with this problem
i have a script that send information from a "form" but the probelm is that i need this to be autheticated (smtp) before sending the email.
Did you know?Explore Trending and Topic pages for more stories like this.
here is the script that i am using: (If you know what i need to do to authenticate this smtp please HELP ME!)
<?php
$emailmanager = 'oscarm@crystalplace.com';
error_reporting(0);
$msg = '';
foreach ($_POST as $k => $v) { $msg .= $k.': '.$v."nn"; }
$email = trim($_POST['email']);
$Ok = ereg("^([a-zA-Z0-9_.-]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([a-zA-Z0-9-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$", $email);
$headers = 'From: ' . $email . "n";
$headers .= 'MIME-Version: 1.0' ."n";
$headers .= 'Content-Type: text/plain; charset=iso-8859-1' ."n";
$headers .= 'Content-Transfer-Encoding: 8bit'. "nn";
if ($Ok) {
mail($emailmanager,'New Trade Form Request from Brilliante Crystal Cleaner',$msg,$headers);
?>
<script language = 'javascript'>
alert('Thank you For Submiting Your Application ---> Brilliante Crystal Cleaner Team <---');
window.close();
</script>
<?
} else {
?>
<script language = 'javascript'>
alert('Sorry, please complete the form.');
history.go(-1);
</script>
<?
}
?>
No comments posted yet
Your Answer:
Login to answer
129
49
Other forums
PHP mail() rejected by SMTP
I'm currently working on a newsletter application which is installed on a windows 2003 server runnin
Doubles are giving me problems
Ok so, first of all i made a double = 0.05, but when running the debugger it shows up as 0.04999. I
Oracle Text CTX_DOC.snippet slow
I have a table (FILE_TABLE) that contains a blob column (ft_file) and I have created the following O
Unable to display contents in Second Drop Down Box
Hi All,
What I am trying to do is 2 dependent drop down boxes and when user selects su
RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to a
Help? Need help on project with templates involving mysql and php.
I'm having a hard time explaining what I want but basically here is what I have in place:
-Da
Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added
MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha
Need help with some php code :)
Hey! I'm quite new to this whole thing, so please don't fire me with shait on this one =D
I'm
Set Categories
I am creating a submission form for somebody to come in and submit products. These products are sep