anicholson / obsidian-google-mail

Fetch emails to Obsidian (as markdown) from Gmail server
55 stars 4 forks source link

Content is not well fetched #20

Closed nicosomb closed 1 year ago

nicosomb commented 1 year ago

The plugin fetches emails, it works.

But tags or body are not correct.

Here is what I put in my template:

${Body|raw} 

${Body} 

${Body|htmlmd} 

${Body|text} 

${Labels}

${Labels|tag}

${Labels|link}

And here is the result:

${Body|raw} 

${Body|htmlmd} 

${Body|text} 

[[obsidian]], [[INBOX]]

${Labels|tag}

${Labels|link}

What did I miss?

thingnotok commented 1 year ago

Hi,

Seems like there's two problems here, failed rendering for ${Body} and multiple reference.

  1. I may need more info to debug the missing ${Body} problem, if possible can you forward me that mail?
  2. In current implementation, each field can only be referenced once in the template note once. So only ${Body|raw} and ${Label} take effect, and ${Label} uses the default format tag.

I'll add support for multiple reference in the next release.

nicosomb commented 1 year ago

It seems that the failed emails are those with attachments.

thingnotok commented 1 year ago

Hi, if possible, can you help me reproduce the bug? I cannot reproduce this with a simple mail with attachments. Maybe there's something special in your mails.

thingnotok commented 1 year ago

Hello! There was a bug where if a mail carried attachments, it might appear empty. This bug has been resolved in the latest release. Please let me know if you continue to experience any issues.