Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
In the email sent from privatemsg, I have a date that is being printed in ISO format. Example: [privatemsg_message:field_arrival_date] prints in the email as 2014-02-03T00:00:00. I just want the date to print. I've tried [privatemsg_message:field_arrival_date:custom:F j Y], but in the email this prints "[privatemsg_message:field_arrival_date:custom:F j Y]". I thought maybe the space in the custom was throwing it, so I tried [privatemsg_message:field_arrival_date:custom:F], but that didn't work. Is it possible to use tokens to format a date in privatemsg?
Comment | File | Size | Author |
---|---|---|---|
#4 | privatemsg_msg_body.png | 27.29 KB | prathamesh.save |
#4 | privatemsg_field_setting.png | 26.05 KB | prathamesh.save |
#4 | privatemsg_email.png | 19.15 KB | prathamesh.save |
#3 | email.png | 5.15 KB | pbland |
#3 | body.png | 22.44 KB | pbland |
Comments
Comment #1
prathamesh.save CreditAttribution: prathamesh.save commentedHi @pbland,
I tried to replicate this issue on a privatemsg 7.x-1.4 and was not able to replicate. While writting the message I included few tokens and got the date formatted as desired. Please refer snapshot privatemsg_1.png for sender and privatemsg_2.png for received message.
Hth,
Prathamesh
Comment #2
pbland CreditAttribution: pbland commentedHi Prathamesh,
I wasn't clear enough with my issue. The issue isn't viewing the message online, it's receiving an email notification with the tokens printing in the email. I've attached 2 images. The first one shows how I setup the body of the notification message in Admin>>Configuration>>Messaging>>Email Notify. The 2nd image shows the email I receive.
Thanks for the help,
Paul
Comment #3
pbland CreditAttribution: pbland commentedComment #4
prathamesh.save CreditAttribution: prathamesh.save commentedHi @pbland,
I tried to replicate this issue on a privatemsg 7.x-1.x-dev. Created date field with ISO format and added the custom format in email notification body but at my side I am getting correct email with respected output. Please refer snapshot privatemsg_msg_body.png for email body, privatemsg_field_setting.png for date field setting and privatemsg_email.png for received email message.
It seems like something is wrong with your date field setting.
Hth,
Prathamesh
Comment #5
pbland CreditAttribution: pbland commentedThanks Prathamesh. I upgraded to 7.x-2 just to see if that would help, but no. I'll keep plugging away to see if I can figure it out. Thanks for trying.
Comment #6
ivnish CreditAttribution: ivnish commented