Send email on Bluehost shared hosting - laravel-5.4

I have tested Laravel emails on local server with gmail smtp and works fine.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=myname#gmail.com
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls
I don't know how to find smtp details on bluhost shared hosting. So anyone knows the setting please comment.
This is what i have used currently on the server
MAIL_DRIVER=smtp
MAIL_HOST=mail.mydomain.com
MAIL_PORT=26
MAIL_USERNAME=myname#mydomain.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls

i tried with account of bluehost, this works:
MAIL_DRIVER=smtp
MAIL_HOST=mail.domain.com
MAIL_PORT=26
MAIL_USERNAME=email#domain.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=null

Related

Forgot password system using Gmail & Laravel 8

I am using built in Laravel 8 login system with its scaffolding have a project that has a forgot password for its login system which sends emails from requests. I'm trying to use Gmail and XAMPP for sending the email. I am unable to send an email using the Gmail account, So I tried configuring my .env and other configuration files in XAMPP. But I get the following error upon sending the request
Swift_TransportException
Connection could not be established with host smtp.googlemail.com :stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Could someone tell me why I'm getting this error and what should I do to get rid of this? Thanks a lot.
<**env**>
MAIL_MAILER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=587
MAIL_USERNAME=********#gmail.com
MAIL_PASSWORD=*********
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=********#gmail.com
MAIL_FROM_NAME="${APP_NAME}"
<** php.ini**>
inside xampp\php\php.ini under the function under the tab [mail function]
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = ******#gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
<**sendmail.ini**>
inside xampp\mail\sendmail.ini under the function [sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=*******#gmail.com
auth_password=******
force_sender=*******#gmail.com

Self certificate in local network on IIS project ASP.NET Core - Not secure (net::ERR_CERT_COMMON_NAME_INVALID)

im tryng to make the https in my project in asp.net core (only in local network).
On cmd i have create a self certificate with this command line:
New-SelfSignedCertificate -Subject "CN=192.168.1.208" -FriendlyName "192.168.1.208" -DnsName "192.168.1.208" -NotAfter (Get-Date).AddMonths(36) -CertStoreLocation cert:\LocalMachine\My
On IIS i bind the port and the certificate like this:
Now if i go on chrome and i search https://192.168.1.208:7001 i have this:
I tried so many attempts, and now i dont know how to resolve this, can someone help me?

Laravel 5.6 SMTP mail sending on local, but it's not working on live server

I am trying to send an email using SMTP. It is working on my local server but not on my live server. The error I'm getting is: Failed to authenticate on SMTP server with username. I had to configure less secure apps from Gmail but still it is not working.
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=abcd#gmail.com
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls
Login to your server via SSH. Locate the project directory, on your production server edit .env file.
MAIL_DRIVER=smtp
MAIL_HOST= { Your HOST }
MAIL_PORT=587
MAIL_USERNAME= { UserName }
MAIL_PASSWORD= { Password }
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS={ From Address }
MAIL_FROM_NAME= { Desired From Name "Demo" }
save and close file.Then, use following command on production server:
php artisan config:cache
It worked for me. Give reply if you find it useful.
Or still if you are facing issue

Opencart from MAMP to Web hosting

I have created an Opencart shop on my locally hosted site on MAMP. Now I have moved the site to a hosting company, I need to know what I need to update for the shop to work. I know that I need to edit the "config.php" files to point to the new links. Then upload the SQL db to the server.
I would be grateful for step by step instructions to get this to work. My opencart config files:
// HTTP
define('HTTP_SERVER', 'http://localhost:8888/shop/');
// HTTPS
define('HTTPS_SERVER', 'http://localhost:8888/shop/');
// DIR
define('DIR_APPLICATION', '/Applications/MAMP/htdocs/shop/catalog/');
define('DIR_SYSTEM', '/Applications/MAMP/htdocs/shop/system/');
define('DIR_IMAGE', '/Applications/MAMP/htdocs/shop/image/');
define('DIR_LANGUAGE', '/Applications/MAMP/htdocs/shop/catalog/language/');
define('DIR_TEMPLATE', '/Applications/MAMP/htdocs/shop/catalog/view/theme/');
define('DIR_CONFIG', '/Applications/MAMP/htdocs/shop/system/config/');
define('DIR_CACHE', '/Applications/MAMP/htdocs/shop/system/storage/cache/');
define('DIR_DOWNLOAD', '/Applications/MAMP/htdocs/shop/system/storage/download/');
define('DIR_LOGS', '/Applications/MAMP/htdocs/shop/system/storage/logs/');
define('DIR_MODIFICATION', '/Applications/MAMP/htdocs/shop/system/storage/modification/');
define('DIR_UPLOAD', '/Applications/MAMP/htdocs/shop/system/storage/upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'root');
define('DB_DATABASE', 'opencart');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
I have contacted my hosting company and the address of folder is:
/home/cluster-sites/3/c/MYWEBSITE.co.uk/public_html/shop
What do I need to change?
My SQL db is set up on phpMyAdmin as "opencart". How do I transfer this to my hosting - do i need to keep naming exactly the same?
I have searched for a step by step guide but so far no luck. Any help would be appreciated.
I found a great step by step guide here:
https://www.squirrelhosting.co.uk/hosting-blog/hosting-blog-info.php?id=47
Is is now working for me

ejabberd contribution mod_apns does not work

I have added mod_apns to my ejabberd server. You can find this module here.
my ejabberd.yml configuration is like this:
mod_apns:
address: "gateway.sandbox.push.apple.com"
port: 2195
certfile: "/Applications/ejabberd-15.10/conf/cert.pem"
keyfile: "/Applications/ejabberd-15.10/conf/key.pem"
password: "myPassword"
the address is sandbox since I am still in development phase. And I have tested my cert.pem and key.pem and they are valid and working.
I send my device token to ejabberd server like this:
<iq type="set" to="myEjabberdServer.com">
<register xmlns="https://apple.com/push">
<token>myDeviceTokenWithoutAnySpace</token>
</register>
</iq>
I can see my device token is saved in apns_users database.
But I still do not get notifications when my user is offline.
Am I doing anything wrong?
Does it work with gateway.sandbox.push.apple.com?
should my device token be without space and only characters?
I appreciate your help..
You have asked for an alternate approach. This alternate approach takes the process of triggering push notifications by the ejabberd server.
1. Use the mod_interact library. This will provide you an ability to transfer your messages to another url.
2. From there on you can use the direct HTTP call for push notifications