xoggoth - there is no way anybody will ever get to see your php - it gets used on the server and never goes outside of it.
If the email is in the php as I showed it above nobody will see it except you (not even the sender)
hth
Oh - one other thing - that php does not clear the form after sending - I have found that some idiots send twice or even 3 times - you can unset the message and subject after the send but then you'll also have to mess around with the earlier logic - I never bothered to fix it on the site it came from. I did rewrite it for another site but that has all sorts of complicated bells and whistles for other stuff so I didn't post it here as it would probably be confusing.
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Simplest sendmail methods for idiots?
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Simplest sendmail methods for idiots?"
Collapse
-
Guest replied
-
Guest repliedPut in some FORTRAN IV, Xogg.
You can use ASSIGNED GOTOs then.
And ARITHMETIC IFs.
Leave a comment:
-
Guest repliedTa vetran.Should have thought of using Javascript as have been doing it recently to highlight buttons etc. Also previous comment which I missed.
PS Fiddle. Your php works. Cheers. All I need now is yet another reference book.
Let's see perl or php, perl or php? hmmmm I know, I'll stick in both. An application can never have too many languages!
Leave a comment:
-
Guest repliedA pox on ezpost, and ezpox's mother, their milkman etc :
slap the usual script language tags round and replace the 1's with an 'i' and bob may be your uncle.
javascript :
var contact = "Xoggy"
var email = "xoggy mail addy leftof at sign"
var emailHost = "domain.com"
var formatmail = '<a href=ma1lto:'
document.wr1te (formatmail + email + "@" + emailHost+ ">" + contact + "</a>")
you could use this :mailtoprotector.com/eprotector.shtml
or have a search for php response forms.
Leave a comment:
-
Guest repliedTa fiddle.I want to try and get website finished this weekend so will give that a go.
Supplementary question. Is it possible to do string concatenation or partial substitution in HTML/php to avoid putting the email address in full so those spamming bastards don't pick it up?
Leave a comment:
-
Guest repliedCode:<?php $msg = ""; if ($from || $formmsg) { $from = trim($from); if (!$from) $msg = "From eMail address missing."; else { if (!eregi("^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\\.)+[a-z]{2,3}$", $from)) $msg = "From eMail address invalid."; } if (!$formmsg) $msg .= "You have not entered a message."; if (!$msg) { $eMail = '[email protected]'; mail( "$eMail", "$subject" , $formmsg, "From: $from\r\nX-Mailer: DT_formmail" ) ; $msg = "Your eMail has been sent"; } } ?> Sample of the html form it's used with <f0rm action="contact.php" method=post> <p> <?php if ($msg) print "<span style='color : red; font-weight : bold;'>$msg</span>"; ?> </p>
<table cellpadding="0" cellspacing="0" border="1" bordercolor="#7c2000"> <tr> <td> <table cellpadding="5" cellspacing="0" border="1" bordercolor="#EEBB00"> <tr> <td width="100%" bgcolor="#EEBB00"><p>Subject: <input type="text" size=40 name="subject" value="<?php print $subject;?>"></p></td> </tr> <tr> <td width="100%" bgcolor="#EEBB00"><p>Message:</p></td> </tr> <tr> <td width="100%" bgcolor="#EEBB00" align="center"><textarea name="formmsg" rows=10 cols=40><?php print $formmsg;?></textarea></td> </tr> <tr> <td width="100%" bgcolor="#EEBB00"><p>From (email) : <input type="text" size=40 name="from" value="<?php print $from;?>"></p></td> </tr> </table> </td> </tr> </table> <input name="send" type="image" src="images/icon_email.gif" alt="eMail" width="59" height="18" border="0"></f0rm>
Leave a comment:
-
Guest repliedCheers to all.
In fact I managed to get the perl in that ref working ok despite the author's deliberate error. As far as I can see, perl should be pizzacake for anyone who has done text parsing in C esp. using stdio.
Checked and the site is supposedly set up for php which would prefer as it is far more trendy and generally koool. Will have another bash. Any sample scripts certainly useful.
Recently juggling with VB, perl, Java script and php and even Pascal to cos the installation utility uses it. Needed to strip out CR from perl script to upload. Dirty prog in C++, piece of cake.Loaded VC++ and couldn't remember how to open or read files!
As Homer Simpson said, everytime I learn something new it pushes some old stuff out!
Leave a comment:
-
Guest repliedThe Cobalt Raq3 does not seem to come with PHP preloaded powerraq.com/datasheetraq3.pdf
A simple way to check is to ftp this ...
Code:<?php phpinfo(); ?>
Sending mail using php is extremely simple and more secure than putting perl scripts on the server which may (if not set up correctly) but used by spammers and cause you some grief.
If you do have php and want to use it ask again and I'll post up some sample scripting.
Leave a comment:
-
Guest repliedUse the perl mongers version
Perl Mongers formmail
Otherwise you might get more rear entries than are normal even in Edinburgh - if you get my drift
Leave a comment:
-
Guest replieduse formmail.cgi - make up html and script would put things into email and send it to you - but for GODS sake rename the file as your site would look clearly amateur like for those in the know
Leave a comment:
-
Guest started a topic Simplest sendmail methods for idiots?Simplest sendmail methods for idiots?
Need to set up so can get orders via webtulipe. Not using horrible html mailto: that opens Outlook and preferably not having email address in complete string where it can be picked up by spammers.
Don't want to fanny about for ages so 2nd part of this looked good:
psp
Course it did not work. Possibly psp not supported on Cobalt raq machines? Any ideas on that or simple alternatives for non server-side webby type appreciated.
(I changed email addresses but left rest well alone as not familiar with psp syntax)Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- How you think you look on LinkedIn vs what recruiters see Today 09:00
- Reports of umbrella companies’ death are greatly exaggerated Nov 28 10:11
- A new hiring fraud hinges on a limited company, a passport and ‘Ade’ Nov 27 09:21
- Is an unpaid umbrella company required to pay contractors? Nov 26 09:28
- The truth of umbrella company regulation is being misconstrued Nov 25 09:23
- Labour’s plan to regulate umbrella companies: a closer look Nov 21 09:24
- When HMRC misses an FTT deadline but still wins another CJRS case Nov 20 09:20
- How 15% employer NICs will sting the umbrella company market Nov 19 09:16
- Contracting Awards 2024 hails 19 firms as best of the best Nov 18 09:13
- How to answer at interview, ‘What’s your greatest weakness?’ Nov 14 09:59
Leave a comment: