Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Streamline.net email

Featured Replies

Hi all ,

 

 

I happen to be hosted with streamline.net and i am having trouble setting up there email scripts with php..

 

Maybe its me as im new with php but i cant seem to get this code to work and send emails

 

myemail is not this email in script i have changed this just added it for this forum.

 

 

 

 

<?php
if(isset($_POST['submit'])) 
{
$to = "myemail"; 
$subject = "Website Email";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message\n";

echo "Data has been submitted to $to!";
ini_set("sendmail_from", "myemail");
mail($to, $subject, $body);

} 
else 
{
echo "Failed!";
}
?>

 

html code

 

<form method="POST" action="mailer.php">
<div id="e_name">Name: <input type="text" id="name" /></div>
<div id="e_email">Email: <input type="text" id="email" /></div>	
<div id="e_mes">Message: <textarea name="message" id="message"></textarea></div>	
<div id="e_but"><input type="submit" value="Submit" id="submit" /></div>
</form>

Edited by Sam G
added [code] tags

Hi

 

Do you know if you are on a windows or linux server.

 

Also try putting this line

 

ini_set("sendmail_from", "myemail");

 

At the beginning after your opening <?php tag

 

Is it giving you any error messages.

 

Pat

Edited by Sam G
added [code] tags

  • Author

Windows server and yes im getting the failed echo .. il try it at top but im sure i did this all ready.

Try changing

<input type="submit" value="Submit" id="submit" />

 

to

 

<input type="submit" value="submit" id="submit" />

Hi - you are missing a variable at the end that Streamline requires - here's some code from one of my mail forms that works on streamline:

 

mail("jo@test.co.uk", "Website Enquiry", "Name: $name\nPhone No: $phoneno\nMessage: $message\n", "From: $_REQUEST[email]", [b]"-fjo@test.co.uk[/b]")) 

 

You need to add in the "-fjo@test.co.uk" part - obviously change to your email (this email must already be set up on the your streamline URL or it won't work - so if you haven't set up an email account yet - do this first).

 

Also you need something like this at the beginning of our php file:

ini_set('sendmail_from', 'jo@test.co.uk');

 

Hope this helps - if not PM me and I'll send you my complete code.

 

Jo

Edited by Sam G
added [code] tags

Hi - you are missing a variable at the end that Streamline requires - here's some code from one of my mail forms that works on streamline:

 

mail("jo@test.co.uk", "Website Enquiry", "Name: $name\nPhone No: $phoneno\nMessage: $message\n", "From: $_REQUEST[email]", [b]"-fjo@test.co.uk[/b]")) 

 

You need to add in the "-fjo@test.co.uk" part - obviously change to your email (this email must already be set up on the your streamline URL or it won't work - so if you haven't set up an email account yet - do this first).

 

Also you need something like this at the beginning of our php file:

ini_set('sendmail_from', 'jo@test.co.uk');

 

Hope this helps - if not PM me and I'll send you my complete code.

 

Jo

 

+1 ;)

Edited by Sam G
added [code] tags

you will need to have the -f parameter but you also have to have a email going from or to a streamline domain. They do this to stop mass spamming.

 

If you are on their linux server you ownt need the ini_set("sendmail_from", "myemail"); string from what i remember. Thats for windows servers only, but obviously you wont be able to use PHP on that since apache is on the linux server they providce.

 

If you search their help section there is a write up there for the correct way to enter the PHP part. If you cant find this let me know and i will try and track it down.

  • 4 months later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.