Inbound email notifications - retrieve mailer name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi everyone,
Currently I have an inbound action created which I want to use to retrieve the name of the sender.
For example, when you receive an email it displays as 'Example user <example.user@gmail.com>.
How can I retrieve the 'Example user' in my inbound to populate the field 'people_name' for example?
Appreciate the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Mark,
I tried that approach and indeed is not the best at all. That's why I'm trying to retrieve the names to try another approach 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi there @rafas_10
ou can retrieve the display name directly from the email object using email.from_name. This will give you “Example user” from an address like Example user <example.user@gmail.com>. You can then simply populate your field, for example: current.people_name = email.from_name;. If from_name is empty (some emails don’t include it), a common fallback is to parse email.from or look up the user by email address in sys_user.
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
Hi Azar,
It's retrieving 'undefined' with that. Maybe the SMTP is not passing everything correctly or system limitation or so, which is unfortunate
