I have hooks created before the SMTP settings were introduced in admin area.
My hooks still send out email, but using the old SMTP settings, where to change those settings now?
@mail using SMTP from settings?
Re: @mail using SMTP from settings?
There is another function sendmail you can use and its paramters
assoc array $mail( ['to', 'name', 'subject', 'message'] )
assoc array $mail( ['to', 'name', 'subject', 'message'] )
Re: @mail using SMTP from settings?
Hello,
how can I use the smtp parameters to send table records via email? I need to use SMTP SSL
how can I use the smtp parameters to send table records via email? I need to use SMTP SSL
Re: @mail using SMTP from settings?
If you have configured SMTP SSL in the Admin settings page under the admin area, all you need to do is use sendmail() function instead of mail. Here is an example of how to use it (it takes its mail config from the admin settings page):
Code: Select all
sendmail(array(
'to' => 'recipient email',
'name' => 'recipient name (optional)',
'subject' => 'Mail subject',
'message' => 'Mail message, HTML allowed'
));
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: @mail using SMTP from settings?
Could you please support CC, BCC and ReplyTo fields in the future.
Your sendmail function should look something like this:
Your sendmail function should look something like this:
Code: Select all
function sendmail( ... ) {
// ...
$pm->addAddress($mail['to'], $mail['name']);
// NEW CODE BELOW ------------------------------
if ($mail['replyto'])
$pm->addReplyTo($mail['replyto']);
if ($mail['cc'])
$pm->addCC($mail['cc']);
if ($mail['bcc'])
$pm->addBCC($mail['bcc']);
// ....
}
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: @mail using SMTP from settings?
Thanks for the suggestion, @jsetzer. Added to our backlog now
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.