Looking around the forum, I see that many users are having problems setting up and sending emails via SMTP. Isolated tips sometimes do NOT lead to success. Here I provide a structured step-by-step guide.
Important
I strongly recommend putting a serial number there. This will help you in case e-mails do arrive for example hours later.
This may help you later on finding and fixing the error.
and confirm the dialog
Especially if there is something wrong, it may take longer than expected.
Luckily you turned on debugging and were patient. The result is displayed
Go back to step 1.4 and change your settings.
Tipp Don't just guess on any servernames or port numbers. Most of the time the information provided by your provider is correct. If necessary, try all possible combinations or encryption-option + available portnumbers in a structured order.
Intentionally my first attempts failed. I had to go back to step 1.4 and change encryption setting.
Quickly check if the test email has arrived in your mailbox
Continue with step 3, if the sending has worked.
Do not cross this line, if the tests have not worked up to here.
Before we write the mail-function we actually want, we will first run a test.
Follow the next 10 steps:
(1) Start your code editor and...
(2) open the file hooks/header-extras.php
.
(3) Copy the following source code from here into your file:
<?php $mail = [ "to" => "your-mail-address@your-mailserver.tld", "name" => "Your name", "message" => "Test-message (1)", "subject" => "Test-subject (1)", "debug" => 4 ]; sendmail($mail);
(4) Change the recipient email-address ("to") and (5) the recipient-name ("name") and...
(6) save the file.
(7) Switch to the browser and...
(8) reload any page of that web application.
You will see debug output directly in your page:
If this works fine, then...
(9) cut the code from header-extras.php
and...
(10) save header-extras.php
.
Insert the source code where you actually want to send your mails, for example in an after_update
hook. Then test it, modify, test and repeat.
Tip Take one small step at a time, then test, then take the next step.
I hope this guide was helpful. Feel free to give me feedback by email.
Today's December-Newsletter is available here.
Subscribe to our newsletter here if you haven't already done so.
Important Notice
The features shown in this "highlights" blog category are a showcase of things which can be done using AppGini
, AppGini Helper Library
, PHP
, SQL
, Javascript
, JQuery
, CSS
and HTML
. This definately does not mean that everything you can see here is part of our product. It took hours, sometimes days of research, trial-and-error, coding and testing. So, these showcases are not part of a 49$ library, they are not single-line copy&paste codes and they are not for sale. Just a demonstration of what can be done and what we did and do in paid projects for our customers.
In most data-centric scenarios the tabular view is very suitable. There are use cases where I would like to have a tiled view. Even better would be if the user could choose. For some time now I have been programming something like this as an extension to AppGini. This is the current state I would like to show you. Please give me feedback what you think and if you are interested in such an extension.
In this tile view i don't want to see all columns, but only certain data. I also want to modify the display, for example bold text or insert pictures. For this I have programmed a "templates" funtionality. This is actually "only" texts templates with placeholders. Since the templates can contain HTML, I am very flexible in the presentation.
// Please note: // this functionality is NOT part of AppGini Helper Javascript Library // nor Inline Detail-View plugin // ... var card = new AppGiniHelper.TV.Tiles.CardTemplate(); card.setPage(`<img src="%image%" class="img-responsive img-circle" /><b>%last_name%</b> %first_name% %middle_names%`); // ... new AppGiniHelper.TV.Tiles.Handler().setCardTemplate(card).init();
At the moment I have programmed three different tile representations.
Bootstrap panels with (optional) header and footer:
Simple tiles:
Tiles with front-page and back-page, both customizable. If the video does not start automatically, please press play button:
Additional buttons, automatically created, for switching between table view and tile view:
The contents and formatting can be customized using a template text with placeholders. Additionally, all elements can be styled using CSS.
As always I hope you like the stuff I do and publish here. I would be pleased if you could give me feedback on this idea. What are you missing, what would you like to have? Would you be interested in such an extension? Please send me an email to appgini@bizzworxx.de. Thank you for taking the time!