Nico Kobes Posted November 20, 2018 Posted November 20, 2018 A client of ours started yesterday a mail loop. For one mail it went wrong. A person gets a extra mail that was generated for a person that should have get his mail. What I discovered is that person two had a invalid mail address (yes I should check this better in the script) but the mail was send to person one. What I do in the script: ---------------------- - I set a local variable $to to the mail address. - I set the $from, $to, $subject, $body - I do EmailRegister and EmailConnectSMTP Then I do: EmailCreate( $from ; $to ; $subject ) and EmailSetBody( $body; "html" ) and EmailBCCRecipients ( "[email protected]") - I add Attachments with EmailAttachFile - And then a EmailSend - And then EmailDisconnect ---------------------- I know I should have checked for a vallid mail address but I use a local variable in the script, how can the second mail end up with the previous mail address?
ryan360Works Posted November 20, 2018 Posted November 20, 2018 Without debugging the script, I can only speculate as to what is happening. First, definitely add error capturing to your script that captures and records errors and then exits the script if an error occurs. If adding error capturing does not prevent this from happening, I recommend debugging through the script and making sure that EmailCreate is getting the expected input. The plugin can only check validity of an email address by making sure that it follows the format "[email protected]" ( or whatever the top level domain is .com,.gov,.edu, etc). If there is no "@" or the domain is malformed then the plugin will throw an error but if it meets the format requirements, it will treat it as valid even if that email address doesn't actually exist. Additionally, if you are looping through records and then setting local variables with field references, if possible, I'd suggest removing that part and using the filed references directly in your function call instead setting local variables, this just simplifies the script and makes it easier to debug. If you continue to have the issue after doing these things, go ahead and reproduce the issue and send your logs to [email protected] and reference this thread. If you have a testing solution that reproduces the issue, that will help in expediting the support process. Log locations can be found here.
Recommended Posts
This topic is 2195 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now