Greetings,
I will certainly hope someone will be able to provide some enlightenment to my problem.
Currently, I have 2 joomla sites, layout and menus are a replicate of the other.
I noticed that on both Joomla, I will occasionally encounter "Unable to send mail" after a form submission.
Is this the fault of my server, or the fault of Joomla's PHP Mailer ? I will certainly love to approach my hosting company for a solution but I do not want to place a false accusation on them.
By default, Joomla will use PHP's mail() function, although you can set it to use other methods (sendmail, SMTP) in the Global Configuration on the Server tab.
The best way to test this would be to set up a small PHP script that sends a message through mail(). Next time you see the message, try running the small script and see if that one fails as well.
I personally preffer using an SMTP server for mailing purpose. I guess your hosting company has provided something like smtp.yourdomain.com
You may use it.
Else, you can use the gmail server smtp.gmail.com
It wont disappoint you for sure.
Related
I'm at the end of my rope here and I'm here to get some help. I'm going to try and explain it as best as I can.
I have a website running on Joomla 3.7.2 which you can visit here: https://www.meteordesign.nl
For some reason my contact form does not work anymore. Whenever I click 'send' the page reloads but no confirmation or an email being sent.
I have tried the following:
Switched from PHP mail to SMTP and send a test mail (came in fine).
Used several other contact form modules and components and even an HTML one which you can find here https://bootstrapious.com/p/bootstrap-recaptcha
They all don't work. I have tried disabling my .htaccess file to see if that solved it but to no avail.
You can find the contact form here:
https://www.meteordesign.nl/contact
I don't know if this is important but recently my hosting provider switched to https. Could that be causing it?
I hope I explained it well. If not feel free to ask me more questions, I really need your help fixing this!
So I finally figured it out...
The problem was the cache settings on Joomla at Global configuration > System > System Cache. I had it on Progressive and after setting it to Conservative my contact form worked again!
You are likely running into a JavaScript issue. Just tested this and you seem that you have solved it. Please let us know what the issue was so that others can learn from your experience.
I'm setting up some transactional email fun in our Codeigniter app via integrating with Sendgrid.
I've got things setup and ready to move forward with creating all of the specific transactions/emails, but I was wondering about the most efficient and/or elegant way of doing so.
It seems a bit convoluted to include the appropriate email code in each of the functions. To call a specific function from a clean and separated email controller would require me to use AJAX (so as to not cause a redirect).
Is there some way that I'm not considering currently that would help balance things, namely cleanliness and separation along with coherency and ease?
Thanks for any thoughts-
Not sure about the specifics of your application structure. But you could always create a model function and call that from the functions in your controller.
CodeIgniter also comes with some built in functionality to help you send emails, specifically setting some of your email settings in a config file so you don't have to rewrite that. http://ellislab.com/codeigniter/user-guide/libraries/email.html
I actually wrote a blog post about this not too terribly long ago. Have a look at this:
http://blog.sendgrid.com/using-sendgrid-with-php-codeigniter/
Essentially, codeigniter comes with an awesome email library that makes it easy to send stuff over SMTP, so I just show you how to hook into that.
I just started on dynamic web development and this thought struck me..
As Google Chrome provides devtools, we are able to change the source code according to our will.
So just curious... Will I be able to send custom AJAX requests to the sever (or run PHP scripts in the sever which I'm not supposed to run) to interact with the databases after editing the JavaScript and some HTML?
Yes, this technology may help you to make client code do whatever you want it to do.
However note that there's no novelty here. You could mess with JavaScript without live editing.
Not mentioning that nothing like this you need to call a PHP script on server because you just have to know a proper URL for this.
Anyway like most of debugging tools, live editing may provide an additional piece of convenience for hacking sometimes.
Besides ping when post is published, I need my wordpress website to ping automatically when page or posts is viewed (i have imported lots of posts from old html).
I don't know what is the format in pinging. a guy told me that ping to some type of website is as simple as running URL like below (is this true?):
http://www.pingserver.com/[URL-TO-PING]
how about pinging to pingomatic?
why do you want to do this? to keep track of every time you get a view? you can set up google analytics (www.google.com/analytics/) and it'll do it much better than ping.
unless you're trying to trigger some sort of event per view, in which case you could set up a RESTful get request that triggers it?
finally, if you're really set on using ping, php comes with support for a ping library: http://www.codediesel.com/php/ping-a-server-using-php/
unlike drupal, wordpress is lack of workflow
the best solution is to integrate drupal with wordpress so you have both feature
I am not a web developer but I do have a lot of programming experience in C# and Windows forms programming. On our company webpage my boss wants me to put in a textbox where visitors can submit a comment and press a submit button and that comment will be sent to an email address. Right now, our website uses just plain old html, no php or javascript or anything like that. I am wondering what is the simplest way to accomplish what I need? Can someone point me in the right direction? The website is hosted on an Apache server so I won't be able to use aspx.
The simplest method depends heavily on what is available. If PHP is supported, use it.
Here's a simple example (I wouldn't focus too much on their HTML -- which is a bit shoddy) but the PHP at the bottom to give you an idea on how to pull the <form> in and send the email.
If you don't have PHP and don't want to install it, you can do this without any server-side code and outsource the problem. Bravenet (a name that will be familiar with any old-school webdeveloper) have a free hosted form solution that lets you post your forms to their server and they email you the result.
Not amazingly professional, but takes about 10 seconds to implement.
The simplest solution would be have the form action as "mailto:email#address.com"
However, this has the downside of the email address being sent to being exposed to spam bots, along with the clients mail application having to load to send the email which can be confusing and slow.
Sending emails in PHP is common, and there are thousands of articles out there on how to do it, here's one
In this case the most simple way is to install PHP to your apache to use the mail()-function.
Of couse you could use tomcat additional to apache, but the configuaration is much more time-eating.
If you don't want to use any sort of scripting technology, then the form mailto might be your only option. You can just make the action of your HTML form mailto:youraddress and the form post will be mailed directly.
I would highly recommend looking into some sort of scripting technology though to do this in a more reliable way....PHP looks like a good fit in your environment.