robertklep / quotefixformac

QuoteFix for Apple Mail —
https://github.com/robertklep/quotefixformac/releases/latest
191 stars 15 forks source link

Replying to emails strange result #68

Closed mgguinne closed 8 years ago

mgguinne commented 8 years ago

Hi,

When I reply to emails that I was the last sender of it uses my name etc. This is even though in the new email it says the recipient in the to field? I am thinking this might be a delay thing before mail changes it etc?

Here is an example: Say I sent an email to bob@gmail.com, he never replied to my email but in mail's conversations I just hit reply. Quotefix then evaluates my email address (using message.from.name) even though in the to field it has bob?

robertklep commented 8 years ago

When you reply to a message you sent, you are going to be the sender, even though the original message (to which you replied initially) was sent by someone else.

Assuming that the original message that you sent was quotefixed as well, you could temporarily disable QF by pressing Opt/Alt when hitting Reply, but AFAIK, Mail will add its own attribution to the mail which will also contain your own name.

mgguinne commented 8 years ago

Hi Robert,

Thanks for your awesome response time :) Not expected but appreciated non the less.

One workaround I did do was to write an if statement to catch my email address and then don’t insert any names etc, not sure if it would be possible to have the "message.to.name” like the “message.from.name”? I think this would fix my issue?

{% elif message.from.email=="mgguinne@gmail.com" %}

Hi ${message.from.to.split()[0]},

Currently I get the full name and the email address, I am sure I could just split this even more with the current output?

e.g. Hi Bob Smith bob@gmail.com,

When you reply to a message you sent, you are going to be the sender, even though the original message (to which you replied initially) was sent by someone else.

Assuming that the original message that you sent was quotefixed as well, you could temporarily disable QF by pressing Opt/Alt when hitting Reply, but AFAIK, Mail will add its own attribution to the mail which will also contain your own name.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/robertklep/quotefixformac/issues/68#issuecomment-227057832, or mute the thread https://github.com/notifications/unsubscribe/AKIoXAim_ya-S-E26APYwr_NIWFJhLufks5qNi9LgaJpZM4I5Woa.

Thanks,

Michael McGuinness

robertklep commented 8 years ago

message.to is an array, because a message can be sent to multiple recipients.

It has a method .join() that can be used to generate a string of recipients, and you can pick which property to use to join. In your case, that would be name:

${message.to.join(', ', 'name')}
mgguinne commented 8 years ago

Hi Robert,

Thanks heaps, working well now with:

% elif message.from.email=="mgguinne@gmail.com" %} Hi ${message.to.join(', ', 'name').split()[0]},

message.to is an array, because a message can be sent to multiple recipients.

It has a method .join() that can be used to generate a string of recipients, and you can pick which property to use to join. In your case, that would be name:

${message.to.join(', ', 'name')} — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/robertklep/quotefixformac/issues/68#issuecomment-227060940, or mute the thread https://github.com/notifications/unsubscribe/AKIoXMHx5dS5yZ0u71WEZJcfuCbSZV4Rks5qNjTrgaJpZM4I5Woa.

Thanks,

Michael McGuinness