News:

Go to HostNed.com
Welcome.  This is a place to get user-to-user support, learn more, and share ideas.  If you can't find your answers here, feel free to ask by creating a new topic or visit the support ticket system at https://my.hostned.com :)  Have fun here!

Main Menu

sendmail usage on HostNed

Started by hncaveman, January 22, 2006, 04:36:50 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

hncaveman

Anyone know how HostNed sendmail works?  My guess is that it doesn't.  I have some scripts that I have used on at least four different servers, and they all worked fine, but apparently not for HostNed servers.

Any ideas?

ctwjr

#1
Hi,

All hostned servers support PHP and should support sendmail, so I suggest to use a simple PHP-based sendmail script.

Here is a sample form:

<html>
<head>
<title>Send a message</title>
</head>
<body><form method="post" action="sendmail.php">
Email: <input name="email" type="text" /><br />"
Message:<br />
<textarea name="message" rows="15 cols="40">
</textarea><br />
<input type="submit" />
</form>
</body>
</html>


Now you need a sendmail.php script:
Create a file named sendmail.php and upload it to the same directory as the form.
<?
// Thanks to HostNed.com for this sendmail script
// Define variables from the form field input
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
// Replace the email address below with your email address
mail( "youraddress@example.com", "Feedback Form Results",
$message, "From: $email" );
// Place here a thank you page that indicates to the user that the form has submitted
header( "Location: thankyou.html" );
?>


Now just create your thank you page named thankyou.html and upload it to the same directory.  Here is a simple example:
<html>
<head>
<title>Thank You</title>
</head>
<body>
<p>Thanks for using the form.&nbsp; Your message was submitted.</p>
<a href="form.html">Back to the form</a>
</body>
</html>
I yam what I yam - Mr Potato Head

hncaveman

#2
Thanks for the code snippet.  Unfortunately, it doesn't work.  Seems to execute but doesn't send any messages.  Hey -- that is the same problem I have with sendmail.  Argh.  Php -- wtf.

hncaveman

BTW -- I need sendmail to work.  Does anyone even know the location?  I can find several, but all have the same results - no functionality.  The one I have been trying to use is in /usr/sbin/sendmail, which is pretty typical for RedHat systems, I thought.

Dynaweb

PHP version of sendmail should work for sure, on all HostNed servers Linux or Windows or whatever.  If you cannot get it to work, contact support via the ticket system with all the relavent details (URLs, etc) and since this above script is officially supported by HostNed they will assist you in troubleshooting.  Then once you get it sorted out, post here what was the matter so as to share knowledge with others.

If you insist on using CGI version of sendmail for some reason, contact support and ask them the location of sendmail for your server (different servers have different locations for sendmail).

hncaveman

#5
Does customer support even exist at HostNed?  I have yet to get any help whatsoever.  I have put forth so much effort is solving what should be a very simple problem that it is rediculous.  They told me my options were to post a message on this dead-ass board, or pay them money to help me solve it.  Since their staff seemed to be less-than knowledgable regarding the subject, I am sure it will take them a long time to figure it out, so I think the best option is to go where the customer support staff have the willingness, knowledge and capacity to help me solve my problems.  It seems to be not very good business to let a customer languish for over a week trying to get a very simple problem solved.  As an example, it took them about four days of constant denial to even acknowledge that I existed as a paying customer.

For those trying to solve my techical problem -- what does php use when you call mail()?  There must be some underlying program in Linux to support that.  I mean, when you call sendmail in Perl, it goes right to the source.  Sendmail is not a cgi thing, it is an OS thing.  I am guessing HostNed didn't set up my sendmail.cf file properly, or something stupid like that.

http://www.sdnp.undp.org/rc/areas/tech/setup/server-setup.html#linuxconf
http://www.linuxgazette.com/issue58/okopnik2.html

ctwjr

#6
QuoteDoes customer support even exist at HostNed?  I have yet to get any help whatsoever.  I have put forth so much effort is solving what should be a very simple problem that it is rediculous.
IMO, and in the opinion of so many others, HostNed has the best support in the industry - hands down.  Beleive me I have used many different companies for so many years.

QuoteThey told me my options were to post a message on this dead-ass board
Please, DONT insult this baord.  Yes, it is new but HostNed has been planning this fourm for a long time taking in the input of many users and industry experts.  Personally I think it is wonderful and it is great that you got response on it right away!  Hey, what about the help I provided for you?  Do you think just because you are not intelligent enough to get this to work or intelligent enough to ask the right questions to troubleshoot your little email thing that it is everyone elses fault but your own?
Quote
Since their staff seemed to be less-than knowledgable regarding the subject, I am sure it will take them a long time to figure it out, so I think the best option is to go where the customer support staff have the willingness, knowledge and capacity to help me solve my problems.  It seems to be not very good business to let a customer languish for over a week trying to get a very simple problem solved.  As an example, it took them about four days of constant denial to even acknowledge that I existed as a paying customer.
Considering your 'already fading fast' reputation here my friend, I tend to not believe you about this.  Looks like you are on your own now.

QuoteFor those trying to solve my techical problem
HAH!  Insult me then expect me to help you?  LOL LOL OMG ... LOL!!!
I yam what I yam - Mr Potato Head

broz2004

Have you even submitted a support ticket? http://my.hostned.com...

hncaveman

Sorry if I insulted you -- no personal attack was meant towards you.  I do appreciate the help, and I am not sure if you are the same as who hosts HostNed, but I could string a list of emails back from customer service that are laughable.  I got one response from customer support that was more than a sentence long.  Hardly the "Customer Service dedicated to professionalism with a personal touch is our specialty" that is claimed on the main page.  Maybe I was just unlucky and got the guy who just got yelled at or something when my trouble tickets and emails came through.

Anyway, I am just frustrated.  No offense, but the last emails I got from my last two trouble tickets, I knew I was on my own.  They referred to cgi scripts as 'tricky'. I have been working on a HostNed server for a bit over a week, and I think we are at the end with them.  It's a shame too, since I am so close to having everything put together.  Getting sendmail to work will put us over the hump.

So, I finally got another trouble ticket posting -- this one answer a day is killing me too.  I finally sat down and created three simple examples for them, including yours, to try and solve my problem.  Hopefully they will come back with an answer soon.  Meanwhile, I was wondering if there is another way to check that it is working with telnet, or some other networking tool. 

Anyway, I guess I will start digging around on http://www.sendmail.org/faq/ for answers.  Seems obvious that sendmail setup is not all that simple.

broz2004

Well, I know that HostNed will work with you to get your problem resolved. I agree with the tech who told you CGI scripts are tricky... because they are. This is why so many websites have upgraded to languages such as PHP and ASP. They are more programmer-friendly (especially PHP) and have a faster growing and more supportive community than I have found with Perl.

Anyway, good luck. HostNed has helped me with problems that I have had in the past, and they are very diligent about doing so. They even have gone out of their way to help me with scripting issues (which is not what they get paid to do). So, I understand your frustration, but I ask that you understand that not everything can be fixed by flipping a switch. Sometimes it's frustrating for computer techs as well.

hncaveman

Finally I am getting some attention.  They gave me a simple script/webpage and said they verified that it worked, but when I tried it, I get nothing.  Must be a firewall somewhere in the mix blocking the outgoing transmission.  At least someone is working the problem.  Seems to be less time between responses tonight too.  I must have gotten the guy who is in a good mood tonight.  :-)  Maybe one or two tries and my problem will be solved.  Woohoo.

ctwjr

Quote from: hncaveman on January 24, 2006, 02:18:28 PM
Sorry if I insulted you -- no personal attack was meant towards you.  I do appreciate the help, and I am not sure if you are the same as who hosts HostNed, but I could string a list of emails back from customer service that are laughable.  I got one response from customer support that was more than a sentence long.  Hardly the "Customer Service dedicated to professionalism with a personal touch is our specialty" that is claimed on the main page.  Maybe I was just unlucky and got the guy who just got yelled at or something when my trouble tickets and emails came through.
Again you attack hostned but show no proof of these insulting things you are saying. If you ask them the location of sendmail (which you should just get from your welcome email link) and they answer you with the right answer, what more do you want?  You want to know how the guy's weekend went or about how his cat ran away?  If you get your answer the first time in plain english than that is great.  If they have at all told you that sendmail is working on the server, then I persoanlly request you take it for the truth.  I rarely need to open a support ticket, but when I do I do not want them to be busy dodging insults from a joker like you.  It is not the job of tech support to debug random scripts that people get off the internet and try to use on their web space.  If they offer you the service of random script debugging, that is good to know they have that available becuase the other hosts I have been with wouldn't even offer that.  Even though HostNed is premium service and can run just about all that is out there, scripts need to be tuned to the account for which they are running on -- especially CGI which is why they ARE tricky if compared to PHP.  With CGI you have shebangs, you have kickers, you have file permissionas and cgi-bins, you have backslashes and more.  With PHP you have none of that.  I gave you a PHP mail form that will work on any server HostNed has.  If you make a private folder for me, PM me the user/pass and I can upload all kinds of form to mail scripts and they will all work.

I yam what I yam - Mr Potato Head

avatarweb

i used sendmail ok.. just with the standard settings, and used the mail function in php



ctwjr

Yes, sendmail usage is standard on all HostNed's hosting servers.  I agree, PHP mail () is the easiest way to send mail.
I yam what I yam - Mr Potato Head