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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

prathamesh.save’s picture

Status: Active » Needs review
FileSize
21.32 KB
18.68 KB

Hi @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

pbland’s picture

Hi 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

pbland’s picture

FileSize
22.44 KB
5.15 KB
prathamesh.save’s picture

Hi @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

pbland’s picture

Thanks 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.

ivnish’s picture

Status: Needs review » Closed (outdated)