I have a VPS hosting and I am using SwiftMailer to send emails using an smtp from another hosting.
When I send an email to the user the source mail contains my VPS ip address and domain in headers, like the following below:
Received: from [ip.ip.ip.ip] (port=•port• helo=mydomain.name) by ....
I was able to hide the domain from swiftmailer using setLocalDomain, but wasn't able to change the IP address even when using setSourceIp on SwiftMailer.
Hint: I don't have access to smtp hosting, I have just my VPS and smtp credentials.
Related
I'm configuring Moodle for a school project and there is a problem in email confirmation process.
following are my configurations:
outgoing mail confirmations
SMTP hosts: stmp.gmail.com:465
STMP security:TLS
STMP Auth Type:LOGIN
SMTP username:****#gmail.com [*admin e-mail*]
SMTP password:****
SMTP session limit:1
no-reply domain
no-reply address:***#gmail.com [*admin e-mail*]
Allowed email domains :
Email display settings
Character set : UTF-8
Allow user to select character set :no
Allow attachments: yes
Email via information: always
when user signed up; admin gets a notification that new user required access but the new user wont get any confirmation email.[before and after confirmation from site admin]
no email can be found in spam or inbox.
please help!!!
For the outgoing mail configuration you should just leave all the settings blank or revert them to their defaults. Unless you have a dedicated SMTP server (i.e. one that is hosted within your organisation and is specifically configured to relay outgoing mail from your Moodle server) then you should just let Moodle use PHP's own mail libraries to send mail.
Hope this helps.
I am struggle for 2 days with this problem.
I am going to send email from my localhost using WordPress.
I am using wp_mail() function so I decided to use WP Mail SMTP plugin.
But I have a problem while configuring it.
This is screen shot of my configuration.
When I try to send test email, it fails.
Anyone please help me
From the plugins list, I've noticed you are using Postman SMTP plugin, which causes conflict with the WP Mail SMTP plugin. If you disable that plugin, it will work correctly.
Try with following SMTP setting for gmail to configure on localhost with your plugin :
HOST : smtp.gmail.com
PORT : 587
USERNAME : Your_gmail_ID
PASSWORD : Your_gamil_Password
Encryption : TLS
NOTE : Make sure your gmail account must be Allow less secure apps: ON. You can turn on less secure apps for your account using THIS URL
UPDATE
As discussed please use following setting in your plugin :
WP Mail SMTP Settings
From Email : Your_gmail_EmailID
From Name : Your_name
Mailer : Send all WordPress emails via SMTP.
Return Path : checked
After that Click on Save Changes
Now under SMTP Options
SMTP Host : smtp.gmail.com
SMTP Port : 587
Encryption : Use TLS encryption.
Authentication : Yes: Use SMTP authentication.
Username : Your_gmail_EmailID
Password : Your_gamil_EmailPassword
After that Click on Save Changes
install plugin wp mail smtp
then in general settings
From Email:your email
mailer: other smtp
SMTP Host:smtp.gmail.com
Encryption:ssl
port:456
SMTP Username: your gmail address
SMTP Password: your gmail password
save settings
after that test email by sending one to
Send To: email that you want to receive email on
and make sure your SMTP Username(your gmail) account has turn on less secure apps
hope i helped.
I am having some problem on sending email through my company's website.
My company is using an Exchange Server for mailing.
Therefore, the email sent from my website HOST address not match the DOMAIN address and yahoo detected my mail as a spam or some mail service blocked and rejected.
Received-SPF: none (domain of xxxxx.com does not designate permitted
sender hosts)
Php Mailer return the following:
SMTP ERROR: Failed to connect to server: Connection refused (111) SMTP
connect() failed. Mailer Error: SMTP connect() failed.
i would like to prevent spam and able to send email through SMTP authentication, what can i do in this situation,? Thanks.
Run your domain through this, and fix everything that's wrong or missing. In PHPMailer, set $mail->SMTPDebug = 3;, to see why your rejections are happening, and read the other advice in the troubleshooting guide.
You have to configura SPF and DKIM at your server.
You need to configure SMTP credentials at phpmailer.
I asked a similar question earlier, but the context has changed a bit. I want to use swiftmailer to send an email in Symfony 2. The problem is I'm using the gmail SMTP server, and so when my message arrives, my email client shows it from gmail.com, rather than mydomain.com. How can I fix this?
$message = \Swift_Message::newInstance()
->setSubject('Hello Email')
->setFrom(array('digest#mydomain.com' => "Digest"))
->setSender(array('digest#mydomain.com' => "Digest"))
->setCharset('iso-8859-1')
->setContentType('text/html')
->setTo('myemail#gmail.com')
->setBody($this->renderView('email.html.twig', array()));
$this->get('mailer')->send($message);
The Gmail SMTP server only allows you to send mail using the email address you're aithenticating with. So if you configured Symfony with
mailer_transport: gmail
mailer_user: myemail#gmail.com
mailer_password: ******
All your messages we'll look like they're from myemail#gmail.com
What you can do maybe is use another smtp server that is more flexible in the types of From addresses they will allow. If you are on a local development server, you could use your ISP's SMTP server, or use one of the various email as a service provider, such as Sendgrid, Mailjet or postmarkapp
They all allow you to send messages from any address you can prove ownership of, after some configuration steps.
One thing that may be worth trying also if you really want to use the gmail smtp server, is to define your from address in your "Send mail as" Gmail configuration (in Settings -> Accounts). This will let your app send email using the configured adresses in the From: field.
I am getting "SMTP Error: Could not connect to SMTP host." error while trying to send mails using GMAIL SMTP and PHPMailer..
The code is working perfectly in local environment but getting error in live (bluehost) server.. Please help
Bluehost wont allow gmail SMTP connections.
Quoting article:
According to bluehost, you cannot send emails through SMTP connections from web applications hosted on bluehost. They only allow sending through their own SMTP servers.
The work around is that I setup a email account in Bluehost the same as the email I use in Google Apps. I then modified the code in Magento to send out using bluehost’s SMTP servers:
For example:
Outgoing Mail Server: (SSL) boxnumber.bluehost.com (server requires authentication)
Supported Incoming Mail Protocols:
* POP3: port 110
* POP3S (SSL/TLS): port 995
* IMAP: port 143
* IMAPS (SSL/TLS): port 993
Supported Outgoing Mail Protocols:
* SMTP: port 26
* SMTPS (SSL/TLS): port 465
And it works, it sends the email out to the customers with the right email address sent from bluehost’s local SMTP servers, so when customers reply to the email address it will arrive in my google apps mail box.