close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

SecurityAssist Forgotpassword issue

Thread began 1/24/2012 4:16 pm by chiakioda428401 | Last modified 1/27/2012 12:33 pm by chiakioda428401 | 3944 views | 21 replies

gary.brett434358

Originally Said By: chiakioda428401
  Problem 2
to send email from the php file, I need to set up smtp sereve, but I beleive the smtp server need authentication, but there is no option for that.
If I set as PEAR mail, I get error something like this,
"Parse error: syntax error, unexpected T_IF, expecting T_STRING in E:\xampp\htdocs\chabuta\webassist\security_assist\mail_php.php on line 88"
We are using justhost for hosting and I contacted them but they can't do tech support at all, the person I talked with didn't even know what smtp is.

I beleive problem 1 is independent problem, as it is the error before the email sending.
I am attaching forgotpassword.php and mail_php.php file and security assist setup window shots.
Thanks,  



Hi, if it helps I had this issue yesterday using Windows 7 Pro & WAMP. I got round it by editing the php.ini file, look for section as below:

[mail function]
; For Win32 only.
; smtp
SMTP = ***.***.***.***
; smtp-port
smtp_port = 25

; For Win32 only.
; sendmail-from
sendmail_from = email@youraccount.co.uk

This is using an internal Exchange box on our LAN, not sure if it will work with Gmail, Yahoo etc due to authentication? Failing that can you upload to your hosting account to test? Save code below into php file in your site root or upload to hosting and just run browser, helped me identify if the issue was WA exte3nsions or my setup!


<?php
// Test PHP Email script by Nate Baldwin, www.mindpalette.com
unset($email);
unset($message);
$errors = "";
$formStatus = (isset($HTTP_POST_VARS['formStatus'])) ? $HTTP_POST_VARS['formStatus'] : "";
if ($formStatus == "submitted") {
$email = (isset($HTTP_POST_VARS['email'])) ? $HTTP_POST_VARS['email'] : "";
if ($email == "") $errors .= "Please enter your email address before submitting form.<br>\r\n";
$emailPattern = "^[A-Z0-9._-]+@[A-Z0-9._-]+\.[A-Z]{2,4}$";
if ($email != "" AND !eregi($emailPattern, $email))
$errors .= "The email address entered does not to be a valid address for testing.<br>\r\n";
if ($errors == "") {
$subject = "PHP Email Test";
$message = "If you receive this email, your server has successfully sent an email using PHP.\r\n";
@$mailStatus = mail($email, $subject, $message);
if (!$mailStatus) $errors .= "Server error - PHP has not been configured to send out emails yet, sorry.<br>\r\n";
}
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive">
<title>Test PHP Email Configuration</title>
<style type="text/css" media="screen"><!--
body, div, td, p { color: black; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #c8c8c8 }
a { color: #00417d; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none }
a:link { color: #00417d; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none }
a:visited { color: #00417d; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none }
a:hover { color: #0064ff; font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: underline }
.error { color: #c80019 }
.success { color: #00417d }
h1 { color: #00417d; font-size: 32px; font-family: "Times New Roman", Georgia, Times; font-weight: normal }
strong { font-size: 16px; font-weight: bold }
form { margin: 0; padding: 6px 0 }
--></style>
</head>

<body bgcolor="#ffffff">
<div align="center">
<h1>Test PHP Email</h1>
<p>To test your server's PHP email configuration, enter your valid<br>
email address below and hit the &quot;test now&quot; button.</p>
<hr width="75%">
<form id="FormName" action="#" method="post" name="FormName">
your email address:&nbsp;<input type="text" name="email" size="32">&nbsp;<input type="hidden" name="formStatus" value="submitted"><input type="submit" name="submitButtonName" value="test now">
</form>
<?php
if ($formStatus == "submitted") {
if ($errors != "") {
print("
<hr width=\"75%\">
<span class=\"error\"><strong>ERROR:</strong><br>
$errors</span><br>
&nbsp;<br>
");
} else {
print("
<hr width=\"75%\">
<span class=\"success\"><strong>Success!</strong><br>
Email message has been sent.<br>
If you do not receive your email, try a different address.<br>
If still no luck, your server's outgoing email may not be working right.<br>
&nbsp;</span>
");
}
}
?><br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<a href="http://www.mindpalette.com">www.mindpalette.com</a><br>
&nbsp;</div>
</body>

</html>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...