#954 ✓resolved
Chauncey

error when composing email's that have tags

Reported by Chauncey | November 2nd, 2014 @ 10:22 PM

I use email tags for many of my online accounts (i.e., email+tag@gmail.com). When a message is sent to this email address and a reply is needed, I have to manually switch to the tag-less form of the email address (i.e., email@gmail.com) in the composer window. If I forget, I get an error message like the one attached when trying to send the message.

In summary, I think it'd be nice for MailMate to automatically switch to the tag-less email when composing replies.

Comments and changes to this ticket

  • benny

    benny November 3rd, 2014 @ 08:52 AM

    It's a bit weird that Gmail does not allow that as a sender address, but MailMate should also not allow it if you have not told MailMate that it is one of your allowed email addresses. You should not provide an email address pattern in the account settings (File ▸ Edit IMAP Account ▸ ...). Did you do that?

  • Chauncey

    Chauncey November 3rd, 2014 @ 06:52 PM

    I do have an address pattern set for the email accounts that support adding tags, as below:

    email+.*@gmail.com

    Also, now that I think about it, the error occurs on an iCloud email address.

  • benny

    benny November 3rd, 2014 @ 08:12 PM

    Ok, you should remove that pattern if you never want to send from these tagged addresses (well, you cannot do that anyways with a Gmail account).

    If the problem is with an iCloud account then look for an address pattern within that account.

  • Chauncey

    Chauncey November 3rd, 2014 @ 09:49 PM

    Oh, I think I see now. The pattern is there for addresses you want to send from, not the other way around!

    I've read the portion from the manual, but could you provide an example of it's use for the different address patterns for further clarification?

    Thanks!

  • John

    John November 4th, 2014 @ 07:02 AM

    Hi. I’m not benny, but perhaps I can help.

    I use FastMail, which actually lets you create many aliases that you can send and receive mail from (specifically, the mail you receive from the aliases gets redirected to your main address). For example, my actual e-mail address could be human@fastmail.fm, but I might want to have completely different aliases that I use for signups, etc. such as person@fastmail.fm, alien@warpmail.net, and human@ownmail.net (FastMail owns all of those domains, btw).

    If I receive a message at one of my aliases, I obviously wouldn’t want to respond back with my main address, so I need a way to send a response using the alias. FastMail lets you do this from their web interface, but if you prefer sending mail from a desktop mail client, it won’t be possible if you use a client like Apple Mail. With MailMate, however, I could use a regular expression like this:

    person@fastmail\.fm|alien@warpmail\.net|human@ownmail\.net
    

    which would let me send mail from any of those aliases right in MailMate. (The backslashes in the regular expression are there to escape the period. Periods in regular expressions have a special function (specifically, it represents any 1 character (except for newline)), however, in this case, we really just want a literal period. Putting the backslash there makes the regex processor interpret the period as, well, just a period).


    Now, say I had these aliases instead: alien1@warpmail.net, alien2@warpmail.net, alien3@warpmail.net, alien4@warpmail.net, alien5@warpmail.net, alien6@warpmail.net, alien7@warpmail.net, alien8@warpmail.net, alien9@warpmail.net, alien10@warpmail.net, etc.

    These follow an obvious pattern, so instead of specifying them all one by one, I could use a regular expression like this:

    alien[0-9]*@warpmail\.net
    

    The [0-9] in the regex represents any one character in the range of characters between 0 and 9. As long as the character encoding being used encodes all the digits next to each other (which is most), the [0-9] represents all the digits between 0 and 9. It’s good practice to use the POSIX character class [:digit:] instead of [0-9] though, as it completely avoids that issue. Substituting it would give you alien[[:digit:]]*@warpmail\.net instead.

    The * that comes right after the [0-9] in the regex means 0 or more repetitions of the previous character. Since the previous character can be either a 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9, I’m sure you can see where this is going.

    In effect, this regex will match all the aliases above, as well as aliases like alien72133@warpmail.net, or alien4837492@warpmail.net, or even just alien@warpmail.net.


    Anyways, that’s a quick look at regular expressions. I didn’t cover the other two example regular expressions in the manual, but they should be easy enough for you to figure out once you know what the special characters mean. The third and fourth examples make use of the . character and the * character like so:

    .*
    

    The . represents any 1 character (except for the newline character).

    The * means 0 or more of the previous character.

    With that information, you can probably figure out what the last two regular expressions do. (Also, keep in mind the backslash before the + in the third regex in the manual. This is because + is also a special character in regular expressions).


    Resources:

    Nice Regex Reference

    Wikipedia

  • benny

    benny November 4th, 2014 @ 07:38 AM

    • State changed from “new” to “resolved”

    Thanks to John for the detailed explanation. I'll just add that it's also possible to add a simple comma-separated list of email addresses to the “Email Address(es)” field. In this case it is also possible to add different names to the addresses.

    Also, the complexity here also illustrates that I made a mistake when choosing regular expressions for defining address patterns. I should have used a so-called glob-pattern which would look much simpler/intuitive and wouldn't need all the escapes. (I might fix this some day.)

    @Chauncey: I assume your problem is resolved? You should just clear the address pattern field.

  • John

    John November 4th, 2014 @ 08:33 AM

    No problem, benny. Just thought I’d add though, that personally, I’d like it if you at least kept regular expressions as an option. Regular expressions obviously give you far more precise control over what to match than globs, and I’d hate to find myself in a situation where I have a set of e-mail addresses that is impossible to match with a glob, but that I know I could create a regex to match. For me anyway, this is certainly possible, considering FastMail lets me create 250 aliases (plus 500 aliases on my own domains), and I somehow seem to be creating at least 4 new aliases per week (around half of which I actually end up using to respond)!

  • benny

    benny November 4th, 2014 @ 09:29 AM

    I'll keep that in mind (it shouldn't be hard to at least make a hidden option). The main problem with regexps is the number of reserved characters leading to a lot of escaping. This is much more readable than the regexp alternative: {mm-*@freron.com,example+*@example.{com,org}}. And I'm a big fan of regexps :-)

  • Chauncey

    Chauncey November 4th, 2014 @ 05:46 PM

    Ok, so in summary, neither iCloud nor Gmail support sending emails from tagged addresses—they only support receiving those emails. Because of this, I should have no address pattern set there regarding tags.

    A couple few more questions then:

    • For iCloud email aliases, the address pattern is a good use case, correct? i.e., email1@icloud.com and email2@icloud.com are both tied to the same AppleID and should be set as discussed above.

    • @John, thanks for the detailed reply. Very helpful! Just one question: what on Earth do you do with so many email addresses‽

    Also, +1 for regex. MailMate seems to be about control more than anything else. Perhaps @benny could allow for both globbing and regex?

  • benny

    benny November 4th, 2014 @ 07:45 PM

    In your simple iCloud case then you can just list the addresses in “Email Address(es)” like this: "email1@icloud.com, email2@icloud.com". You can even add a custom name for the secondary address: "email1@icloud.com, "My Other Name" email2@icloud.com". The latter is not possible using address patterns.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Pages