Hello,

I was wondering if it would be possible to integrate this awesome module with Mail Editor module that allows editing of the Mail templates.

I am needing this as it allows different email to be sent depending on the language. If from /en I want the email sent in English and from /ja sent in Japanese. The Mail Editor would allow the emails to be sent fully customized with different placeholders and all.

Also, I need the links to be sent as below because depending on the url the user gets another role.
English email = give link http://www.example.com/en/user/register = role A when registered
Japanese email = give link http://www.example.com/ja/user/register = role B when registered

Thank you!

Comments

YK85’s picture

subscribing - Im looking to use Invite module and need this as well.

nicedawg’s picture

Status: Active » Needs review
StatusFileSize
new2.95 KB

Here's a patch which tries to do just that.

It defines the necessary hooks for integration with the Mail Editor module.

Thanks!
Brady

robby.smith’s picture

Status: Needs review » Reviewed & tested by the community

Nice! This works great =)

YK85’s picture

+1 for commit, thanks!

YK85’s picture

Happy New Year!

Thanks for all of your hard work in 2010.
I look forward to using and following the development of Invite module in 2011.

Please review this patch when you have time and commit.

nyleve101’s picture

StatusFileSize
new138.84 KB

Hi,

will this allow users to send out invites like the ones currently sent out by groupon?

Hope all is well!

Thanks,

Evelyn

chuckbar77’s picture

Great work! RTBC

warmth’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

Any news about committing this and porting it to Drupal 7.x?

I asked for Mail Editor module support here: #1878342: Invite support but the developer told me:

Mail Editor is ready for every client module that wants to use it.

So I guess the support must be given by you. Any chances?

warmth’s picture

Version: 7.x-2.x-dev » 7.x-2.1-beta2
matt.rad’s picture

Issue summary: View changes

@Bilmar,
I am in the same boat as you with registration URLs. I know its been a while, but did you figure this one our?
Matt

mrded’s picture

Version: 7.x-2.1-beta2 » 7.x-4.x-dev
Component: Miscellaneous » Code
Status: Reviewed & tested by the community » Needs work

Need to be converted to 4.x branch.

mrded’s picture

Guys, what do you think if I move all email settings from invite entity to mail_edit?
Thus we will get rid of following fields:

  • field_invitation_email_subject
  • field_invitation_email_body

In this case users will not be able to edit subject and body every time will be used template from mail_edit. But it will simplify the module a lot by delegating most email of work to mail_edit

mrded’s picture

Status: Needs work » Needs review
StatusFileSize
new17.91 KB

Please, take a look my patch, there many things has been changed.

Following variables/settings has been deleted:

  • invite_default_mail_body
  • invite_default_mail_subject
  • invite_default_replace_tokens
  • invite_message_editable

All email logic has been moved to mail_edit module.
Now if you need user to create invite with custom text - you need to print [invite:field-invitation-email-body] & [invite:field-invitation-email-subject] fields inside your invite template.

As you can see it has simplified code a lot. And I hope it's the best time to apply the patch because module still in beta.

Thanks.

mrded’s picture

StatusFileSize
new5.31 KB
new17.91 KB

New version of the patch will delete field_invitation_email_subject and field_invitation_email_body from entity if they are not editable.

mrded’s picture

StatusFileSize
new20.25 KB
new5.31 KB

Sorry, wrong file.

alfthecat’s picture

patch in #15 seems solid. After cache clear I was able to use mail_edit and provide multilingual email text.

patch -p1 < invite-806450-15.patch
patching file modules/invite_by_email/invite_by_email.admin.inc
patching file modules/invite_by_email/invite_by_email.info
Hunk #1 succeeded at 6 with fuzz 1.
patching file modules/invite_by_email/invite_by_email.install
patching file modules/invite_by_email/invite_by_email.mail_edit.inc
patching file modules/invite_by_email/invite_by_email.module
ckng’s picture

Status: Needs review » Needs work

Patch rejected :)

First, not everyone is using/want to use mail_edit. Second, do not find adding additional dependency is attractive and on top of that, it is rather not nice to break existing installs when they update. If you could tweak the patch to support mail_edit when it is available, leaving the rest as it is, will add it in.