Sending mail from the forum, question to @Milo (General)
Hello
Interesting discussion.
So my suggestion is as follows:
If the user is NOT logged in, no copy is sent to the user. And a text informs the user about that and tells the user to log in if he wants a copy.
If the user is logged in, send a copy to the senders email address. But don't allow the user to change the sender email address in the contact form.
To recapitulate the by Milo linked (ancient) discussions and your proposals:
- Not logged in users should not be able to receive a copy of the e-mail.
- Logged in users should be able to receive a copy of the e-mail.
- The ability to change the senders e-mail-address is a no go.
- IMHO the copy of the e-mail should not be mandatory.
That would result in a (pseudo code) structure like this:
if (send-with-copy OR send-without-copy) {
// mail form was sent by a visitor or registered user
if (user-is-registered) {
// form was sent by a registered user
if (recipient-is-valid) {
// send e-mail to the recipient
}
if (send-with-copy AND sender-is-valid) {
// send additional e-mail to the sender
}
} else {
// form was sent by an unregistered visitor or a not logged in user
if (recipient-is-valid) {
// send e-mail to the recipient
}
}
}
Testing for recipient-is-valid
includes the check for a valid address or a valid user-ID and the activation of the contact-function by the desired recipient. Testing for sender-is-valid
includes the check for a valid address and the validity of the ID of the current user.
Tschö, Auge
--
Trenne niemals Müll, denn er hat nur eine Silbe!