Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Mail Server
  • Search

Mail not sending

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
rajatvarshney
Posts: 2
Joined: Sat Dec 28, 2019 6:47 am

Os: Ubuntu 15x
Web: apache + nginx
Mail not sending
  • Quote

Post by rajatvarshney » Sat Dec 28, 2019 6:59 am

Hello vesta community,

I have researched a lot on forums or on the web but nothing is working i am not able to send an email with SMTP settings, without the SMTP settings it's going to spam.
I am using Codeigniter framework,

Code that worked (without SMTP)

/////////////But this is going in SPAM/////////////

$this->load->library('email');
$this->email->from("[email protected]");
$this->email->to("[email protected]");
$this->email->subject("test email");
$this->email->message("test");
if ($this->email->send()) {
echo 'Your Email has successfully been sent.';
} else {
show_error($this->email->print_debugger());
}

/////////////But this is going in SPAM/////////////

After that, I have created an email account for one of my domain and with its smtp settings:

Username:[email protected]
Password:7QD4GzSDKc
SMTP hostname:mediabharti.org
SMTP port:587
SMTP security:STARTTLS

//// Code With SMTP///

$this->load->library('email');
$config = array();
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'mediabharti.org';
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = '7QD4GzSDKc';
$config['smtp_port'] = 25;
$this->email->initialize($config);
$this->email->set_newline("\r\n");



$this->email->from("[email protected]");
$this->email->to("[email protected]");
$this->email->subject("test email");
$this->email->message("test");

if ($this->email->send()) {
echo 'Your Email has successfully been sent.';
} else {
show_error($this->email->print_debugger());
}

//////////


But Its throwing Error:

A PHP Error was encountered
Severity: Warning

Message: fsockopen(): unable to connect to mediabharti.org:25 (Connection timed out)

Filename: libraries/Email.php

Line Number: 2055

Backtrace:

File: /home/medbha/web/english.mediabharti.net/public_html/application/controllers/Home.php
Line: 48
Function: send

File: /home/medbha/web/english.mediabharti.net/public_html/index.php
Line: 315
Function: require_once



//////

Please Somebody Help!!!
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Mail not sending
  • Quote

Post by skamasle » Wed Jan 01, 2020 9:00 pm

Hi

If mail go to spam, isnt a vesta problem, maybe your IP reputation is bad, or you not have setup property some records like SPF; DKIM or any orther
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Mail Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password