I get the following message when using event BeforeAdd
Error number -2147220978
Error description :The server rejected the sender address. The server response was: 530 5.7.0 Authentication required
URL /Output_2007/Club_Officials_Contact_add.asp
Solution please fill all required fileds on the Security Tab.
My Security Fields are filled in correctly as simple email works fine. It's when I try to send new data record where I get this error.
Code In Events : Before Add
__
Function BeforeAdd(dict)
' Parameters:
' dict - Scripting.Dictionary object.
' Each field on the Add form represented as 'Field name'-'Field value' pair
'** Send email with new data ****
' do not forget to setup email parameters like From, SMTP server etc
' on 'Security->User login settings' dialog
Dim keys
message =""
keys = dict.keys
For n = 0 To dict.Count-1
message = message & keys(n) & " : " & dict(keys(n)) & vbcrlf
Next
email="myaddres@mydomain.tv"
subject="Add This Contact to Administration"
sendmail email, subject, message
BeforeAdd = True
' set BeforeAdd to True if you like to proceed with adding new record
' set it to False in other case
End Function