Jump to content

Send emails from custom module


Eduardo G.

Recommended Posts

Hi all, I'm developing some modules to add extra funcionality to whmcs.

I use them as Addon Modules.

How should I send an email from my module?

I want to create email templates so my module can use them to send emails, but found nothing about email funcions.

How are you managing this?

 

Thanks

Link to comment
Share on other sites

Thanks, HerrZ.

 

I'm trying to create these modules without the usage of an API, so any user can just upload them and use them, without the need of enabling api accessn creating api user and configuring module.

IMHO, I think API is great for external apps, but not so much for internal modules, don't you agree?

 

Are module developers using always API funcions? should I use them? isn't it too complicated using and configuring api access for extra modules? am I wrong?

Link to comment
Share on other sites

i agree and i dont explored yet which core function sends out the email templates by default.

 

for sending just the templates the api is theoretical a big lump of code for sure. but its easy to use like a swiss army knife. i built me an whmcs api class. so i can easily call any api function anywhere in my code. no matter it is standalone, or cms or whmcs system. concluding it is a little bit oversized but its IMHO the best solution as long the core is encoded ;)

 

Are module developers using always API funcions?

no

 

and you are not wrong and i think the way you are thinking is in a good code ethic. hope you understand my sentences in "english".

merci.

Link to comment
Share on other sites

Thanks very much for your answer, I'm glad to see that my point of view is not far from others.

Making an api-class is a great idea, but it still needs api enabled to use the modules I made.

Hmm.. open source code, I miss you...

 

Anyway thanks for sharing your opinion with me ;-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated