Jump to content

AR_1986

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

AR_1986's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. can no one help? Im soo stuck. Has anyone with an oscommerce store experienced this problem?
  2. Hi, everyone, im trying to configure my oscommerce website email but im having a nightmare doing it.for some reason my hosted streamline.net email address wont work when i use it on my site but every other email address will. The oscommerce admin is already configured to send emails but the only address it wont send to is the one i need to work (sales@mywebsite.co.uk). As a result i assumed it must be something at my hosting providers end stopping my emails from coming through to my outlook account from the website because hotmail accounts, yahoo accounts and even my virgin media account all work. I just needed to know what has to be be done to get emails on the contact us page to send to sales@mywebsite.co.uk when people click submit. I asked my host if they knew what the problem was and they said: - Thank you for your query To prevent spam being sent through our webservers, there are certain conditions that must be met before our SMTP servers will send the email. 1) Email must be sent to, or from, an email address hosted by Streamline.net. An email address hosted by Streamline.net is not the same as a domain name hosted by Streamline.net. If your domain's MX record points to another email provider, it will not count as being hosted by Streamline.net. 2) To stop misuse of your form by third parties the sendmail_from variable should be set to your Streamline.net hosted email address. While access to the php.ini file is restricted on our shared environment, you can set this variable using the ini_set() command, shown below. 3) A fifth parameter -f should be added to the sendmail function. This will set the name of the from email address. In its basic form, a simple sendmail script will look like this: ini_set("sendmail_from", " user@yourdomain.com "); mail($email_to, $email_subject, $email_message, $headers, '-fuser@yourdomain.com'); ?> Provided that you set the sendmail variable, before attempting to send the email. Specify the from address as a fifth parameter in the sendmail function, and the email is either to, or from, a Streamline.net hosted email address you should have no problems. Example This example will take the information from a feedback form, send it to you in an email message, then forward the customer to a "thank you for your comments" page. In this example we will use bobsdomain.co.uk as the domain name. There is a mailbox hosted with Streamline.net called bob@bobsdomain.co.uk. A simple feedback form First of all we need to create a feedback form that will receive the data. We will call this form feedback.html. In its most basic form, it can look like this: Email address: Name: Message: <br /> example feedback form Not the prettiest form, but it can be tidied up, and validation can be added at a later date. This form has three fields (email address, name and message) that users can fill in. Once the user click the Submit button, it will collect the information contained within the fields, tag the information as "email, name and message", then send the information to sendmail.php. The sendmail script Now we have a form that sends information to a script, we need to create a script to send the email. In this example, we will name the script sendmail.php as this is the address the our form is submitting the data to. In order to send an email, we need certain information (variables), so lets set them first. ini_set('sendmail_from', $email_from); $email_to = "bob@bobsdomain.co.uk"; $name =$_POST['name']; $email_from =$_POST['email']; $email_subject = "Feedback from website"; $comments = $_POST['message']; $headers = "From: $email_from .\n"; "Reply-To: $email_from .\n"; Now lets build the message of the email with the users name and comments. $message= "Name: ". $name . "\nComments: " . $comments; Finally, let's send the email. If the email is sent we will go to a thank you page, if there is an error we will display a brief message. $sent = mail($email_to, $email_subject, $message, $headers, '-f .$email_from'); if ($sent) { header( "Location: http://www.bobsdomain.co.uk/thankyou.html" ); } else { echo 'There has been an error sending your comments. Please try later.'; } ?> example sendmailscript form This script does not have any validation or error checking, so it is not recommended that you copy it directly to your website, however, it does show the basics of sending email from our webservers, and can be used as a framework for your own scripts. The only problem is i have no idea what that means, how to make a script, what to call it and where to put it for it to work. Im confused because the oscommerce store template comes with all its own files, like contact_us.php etc. would i have to change that? Is the script example above for people making their own site using php of would it still apply even if its a template im trying to customise. If anyone can help me, i'd be eternally grateful. Im a complete noob at php. The whole oscommerce store works apart from the email. Thankyou.
  3. i just did a quick test with the email settings. I used my hotmail address instead of sales@mywebsite.co.uk for the email address and email from settin gs and as soon as i filled the form out and clicked submit i recieved it in my hotmail account. So this means there is a problem with my hosting right? Thats the first time its ever worked. Im using streamline.net if its any help. I'll send them an email now and see if its something maybe on their end.
  4. Thanks, i have downloaded PHPMailer 4.04 but i have no idea what to do with it, im really new to php. I just purchased an oscommerce and i've managed to get everything running apart from email. What would i do next with this. Thanks
  5. Im not sure what that means, im just trying to send mail from my website. There is a contact us page and when myself and customers come to my site i want them to be able to fill that form out, click send and then have it come to my email address. Im using the oscommerce admin page to configure the email options but nothing seems to get those messages to send.
  6. Hi, im trying to get email working from my site, having put the email address i wanted in E-mail Address and E-Mail From nothing happens. I try sending test emails from the contact us and i get nothing. what exactly is the E-Mail From line asking for? its default value is set to osCommerce <root@localhost> what do need to replace that with? I have already changed the value of E-mail address to alex@mywebsite.co.uk and i even tried pasting the same into the E-mail Address From line but nothing happens. Do i need to use my incoming and outgoing mail server on any of these or is an email address sufficent? Im confused lol thanks for you help people? I know smtp is enabled because i use it for my outlook account. I have checked to see what my smtp settings are and have managed to get the following: - SMTP server: authsmtp.streamline.net SMTP username: your email address (ie root@mywebsite.co.uk) SMTP password: your password SMTP port: 25 but i still dont receive any emails when i send from my site. i have the following settins on the Oscommerce admin: - My Store E-Mail Address- sales@mywebsite.co.uk E-Mail From - sales@mywebsite.co.uk E-Mail Options E-Mail Transport Method - smtp E-Mail Linefeeds - LF Use MIME HTML When Sending Emails - true Verify E-Mail Addresses Through DNS - true Send E-Mails - true i have tired changing the email options to - E-Mail Transport Method - sendmail E-Mail Linefeeds - LF Use MIME HTML When Sending Emails - false <--set to false for now Verify E-Mail Addresses Through DNS - false Send E-Mails - true but nothing happens. My webhost server is set to Linux. If thats any help.
  7. can you do that in puTTy? i though you had to follow oug rwx commands? I don't use putty but I'm almost positive you can. Try it. mate...your a total legend! It worked and was so simple. I think because im new to php and don't know what im doing im over complicating things for myself. Thankyou soo much!
  8. can you do that in puTTy? i though you had to follow oug rwx commands?
  9. Hi everyone, im trying to figuring out what the correct chmod command line for putty would be if i wanted the file permission for confiugre.php to be read only to everyone. 444. Im not to sure how to structure the command. would this be right? chmod a-r configure.php Many thanks.
  10. Hi, i go the details i needed and im logged in. I've figured out how to get to the folder i need (only just) using some basic commands and im now at /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes but how would i now change the file permission of configure.php, what command do i type to open it? if i type the command ls i can see it but i dont know what to do next. thanks. omg, i finally sorted it! thankyou so much ! All i need help with now is figuring out what the correct chmod command line for putty would be if i wanted the file permission for confiugre.php to be read only to all. 444. thanks would this be right? chmod a-r configure.php
  11. Hi, i go the details i needed and im logged in. I've figured out how to get to the folder i need (only just) using some basic commands and im now at /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes but how would i now change the file permission of configure.php, what command do i type to open it? if i type the command ls i can see it but i dont know what to do next. thanks.
  12. I downloaded the putty.exe client and run it, it then proceeds to ask me for the hostname, is this is ssh.mywebsite.co.uk hostname? or another? I tried it with that and selected ssh under connection type but when i click open, it asks me to login as: what is it asking for? I dont have a particular username for it? i tried a couple different names to which it asked me for example@ssh.mywebsite.co.uk's password: but when i enetered the password i specified in my webhost control panel it says access denied
  13. yeah i have the server on linux. Im not to sure about the shell access, what does that mean? im fairly new to php. how would i go about doing that? thanks
  14. Hey idougherty, cheers for the reply, i tried it but got nothing. I tried changing both permissions to 444 and 400 but for some reason by the time i have changed the permission of the second configure.php in /htdocs/admin/includes/configure.php, the first in /htdocs/includes/configure.php has reverted back to its original permission. /htdocs/admin/includes/configure.php reverts back to 604 /htdocs/includes/configure.php reverts back to 644 I launched the browser but the error message is still there. 'Warning: I am able to write to the configuration file: /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. omg...i just double checked on my webhost ftp and its not even changing the permission when it says it is. its says: - File /htdocs/includes/configure.php was successfully chmodded to 444 All the selected directories and files have been processed. then as soon as i refresh the page or log out the configure.php files revert back to 644 and 600. what the hell is going on lol
  15. Hey idougherty, cheers for the reply, i tried it but got nothing. I tried changing both permissions to 444 and 400 but for some reason by the time i have changed the permission of the second configure.php in /htdocs/admin/includes/configure.php, the first in /htdocs/includes/configure.php has reverted back to its original permission. /htdocs/admin/includes/configure.php reverts back to 604 /htdocs/includes/configure.php reverts back to 644 I launched the browser but the error message is still there. 'Warning: I am able to write to the configuration file: /home/fhlinux197/e/mywebsite.co.uk/user/htdocs/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.