Ima Lozer wrote:
Quote:
I am in the process of writing an app for one of my sites that will
allow guests to send e-cards to other folks. The process is fairly
simple. First the sender selects a card graphic via a series of radio
buttons. Then he enters his and the recipient's name and email address.
Next he enters a message to the sender and clicks a button to send the
card. What I need help with is code to test the input in all appropriate
fields to ensure that no oen uses the script for black hat purposes. In
addition to anything else that may be an issue I'd like to address the
following.
>
1) Ensure that the email addresses values entered (recipient and sender)
are both validly formatted (e.g.
foo@bar.com) and contain one and only
one address each.
>
2) The message contains text only. No attachments allowed.
>
>
I'm basically looking for ways to block the black hats from using this
for spam or spreading any malware. Direct assistance with this or being
pointed to a reference that addresses the subject would be appreciated
>
>
Thanks
DB
I find that phpmailer can be easily modified to do the actual sending -
you may need to configure SSL/TSL authenticated SMTP to your ISP
outbound servers (unless you have full control over your ReverseDNS and
your own SMTP server - in other words - if you do not fully own and
control the IP address(es). If you do use DynamicDNS you will be
blacklisted anyway. It seems to me to unfair, but fighting that is a
losing proposition.
You will want to take a look at some sort of Captcha to ensure only
humans are interacting with your site. (ie. "enter at this funky-looking
picture of this word and type in the word here...")