Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    velocity mail: send mail on deletion, but variable is not available

    Hello,

    Using: Isomorphic SmartClient Framework (SC_SNAPSHOT- 2011-06-07/PowerEdition Deployment 2011-06-07).

    When deleting a certain record, the following is sent to the server:
    Code:
    === 2011-07-01 16:45:55,659 [l0-7] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
    ...
            email:"test@test.nl",
    ...
        },
        operationConfig:{
            dataSource:"CourseEdition_students_Student",
            operationType:"remove"
        },
        componentId:"isc_ListGrid_5",
        appID:"builtinApplication",
        operation:"CourseEdition_students_Student_remove",
        oldValues:{
    ...
        }
    }
    I have an operationBinding that should send an email, specified as follows :
    Code:
        <operationBinding operationType="remove" requiresRole="ROLE_USER" requiresAuthentication="true"> 
          <mail> 
            <from>noreply@mydomain.nl</from>  
            <to>$dsRequest.criteria.email</to>  
            <templateFile>emailtemplates/student_unsubscribe.txt</templateFile>  
            <subject>Uitgeschreven voor cursus</subject> 
          </mail> 		
        </operationBinding>
    But when this is executed, it gives the following error:
    Code:
    javax.mail.SendFailedException: Invalid Addresses;
      nested exception is:
    	com.sun.mail.smtp.SMTPAddressFailedException: 501 <$dsRequest.criteria.email>: recipient address must contain a domain
    Somehow the velocity variable is not resolved, whilst in the criteria, as you can see, there IS a valid emailaddress present (obscured for this time, but I've got a valid email address here).

    What am I missing?

    #2
    Do you modify the dsRequest, convert it to AdvancedCriteria, or anything of the kind? If so $dsRequest.oldValues.email should also work.

    Comment

    Working...
    X