Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all 29743 articles
Browse latest View live

how to insert new line in the email using linux mail command?

$
0
0

how to insert new line in the email using linux mail command?

echo "Hi xxx, would you tell me something?\\n thanks!\\n -xxx" | mail -s "subject" xxx@gmail.com

The email shows the literal '\n', not a newline, how do fix it?


Exim (smtp) doesn't accept my Thunderbird identities anymore

$
0
0

I've Googled extensively several time but I cannot find a solution.

On my virtual webserver that I manage with DirectAdmin, since an update, I cannot send mail anymore from my Thunderbird identities I set up for my main mailaccount.

Basically I have one emailaccount, yet I want all mail from several domains on my server end up in that one account. With Thunderbird Identities, this was never a problem. I could send and receive mails for/from info@domain1.com and info@domain2.com in the same IMAP account for info@domain1.com.

However, sending mails has stopped working for anything than the main account. The error is the famous "My Alias Name ( <info@domain2.com> ) must match your authenticated email user ( info@domain1.com )".

The DNS of the domains all point to the same server and the websites are also all on that server. Receiving mail goes fine (via a spamfilter construction that accepts multiple domains and delivers to the same address). I run CentOs 7 and DirectAdmin.

I understand that they close the door for external email-addresses for anti-SPAM. However the domains I use in the "From: " field are from domains on the same server! And I do absolutely NOT want add more email accounts to my mail client (Thunderbird), I want it to work like it always did.

Is there anyway to tell EXIM to accept mails via SMTP from any emailaddress that originates on this server, or to whitelist domains? I tried looking at exim.conf but I don't understand enough of it.

Is there anyway I can tell EXIM to accept From-addresses from all local domains?

Google Sheets: Automated email when cell value is less than another

$
0
0

I am trying to make an inventory sheet where an automated email will be sent out when the inventory falls below a specific limit. I have set it so B2 is < C2, but I am not getting an email.

function sendEmailAlert() {

var sheet = SpreadsheetApp.getActiveSpreadsheet();

var rangeA = sheet.getRange('A2:A8');

var item = rangeA.getValues();

var rangeB = sheet.getRange('B2:B8');

var inventory = rangeB.getValues();

var rangeC = sheet.getRange('C2:C8');

var limit = rangeC.getValues();

var toEmail = 'XX@XX.com';

var subject = 'Inventory to Order';

var body = 'Item:' + item + 'needs to be ordered';

for (i in item){

if(inventory <= limit ) {

 MailApp.sendEmail(toEmail,subject, body);

}

} }

Emails not sending through Django Contact Form

$
0
0

I created a Contact form on my website built in Django but emails sent from the form do not seem to actually send. Here is my form code in forms.py:


class ContactForm(forms.Form):
    email = forms.EmailField(required=True)
    subject = forms.CharField(required=True)
    message = forms.CharField(widget=forms.Textarea, required=True)

Here is the code in my views.py:

def contact(request, success=""):
    submitted = False
    template_name = "main/contact.html"
    if request.method == 'GET':
        form = ContactForm()
    else:
        form = ContactForm(request.POST)
        if form.is_valid():
            subject = form.cleaned_data['subject']
            from_email = form.cleaned_data['email']
            message = form.cleaned_data['message']
            try:
                send_mail(subject, message, from_email, ['MYEMAILHERE'])
            except BadHeaderError:
                return HttpResponse('Invalid header found.')
            return redirect("success/")
    if success != "":
        submitted = True

    context = {"form": form,
               "submitted": submitted}
    return render(request, template_name, context)

And finally here is the forms html code:

{% load crispy_forms_tags %}
<h1>Contact Us</h1>
<form method="post">
    {% csrf_token %}
    {{ form|crispy }}
    <div class="form-actions">
      <button type="submit" class="btn btn-primary mb-2">Send</button>
    </div>
</form>

If any other code is needed to help debug please let me know and I will include it. Thank you.

extracting unique values from a column with multiple criteria

$
0
0

I have data where im trying to extract unique values from one column for each set of my customers. i want to use the data to do a mail merge . for instance column A has multiple entries for each customer name. so in column A cells a1:a6 all say "abc company" the cells a7:a11 all say "X company". in column B it has a recommended part number list. so b1:b3 all say "01-ssc-011" then b3:b5 all say 01-ssc-044 then b5:b8 all say "01-ssc-011" and finally b8:b11 all say 01-ssc-044"

how would i extract the unique part numbers for each set of customers. I want to essentially delete duplicate instances of part number PER CUSTOMER and leave only unique part numbers for each customer.

enter image description here

How to setup IMAP backend in Rails 5?

$
0
0

I have a rails 5 application and I have stored emails in mysql database.

What I want to do:

  • I want to setup an IMAP backend in my Rails 5 application
  • So that, users can use android and desktop email client to connect to my rails app
  • And sync emails from my database to their email app (like gmail app)

  • I want a very lightweight solution
  • If no solution is available, may be, I will build it myself.

So, any suggestion / tips / documentation / tutorial is highly appriciated.

Thanks.

MultiThreading in javaMail with Kotlin

$
0
0

I'm trying to build an email client app via javaMail with Kotlin. I used doAsync for multiThreading. But I have some problem. Getting data through the IMAP protocol is okay. When I put data into cardView, it has a problem. I used doAsync again in OnBindViewHolder to get data from javax.Message type. That was slow and not show full data into card View. -> Help me <--

This is adapter

import android.annotation.SuppressLint

import android.content.Context

import android.view.LayoutInflater

import android.view.View

import android.view.View.*

import android.view.ViewGroup

import androidx.core.content.ContextCompat

import androidx.recyclerview.widget.RecyclerView

import g2sysnet.smart_gw.R

import g2sysnet.smart_gw.inters.EventChanger

import kotlinx.android.synthetic.main.mail_reciever_row.view.*

import org.jetbrains.anko.custom.async

import org.jetbrains.anko.doAsync

import java.text.SimpleDateFormat

import javax.mail.Message

import javax.mail.internet.InternetAddress

class testAdapter (val context : Context, val receiveMessage : Array<Message> ,val eventChange : EventChanger):
RecyclerView.Adapter<testAdapter.ViewHolder>(){

@SuppressLint("SimpleDateFormat")
override fun onBindViewHolder(holder : ViewHolder, position: Int) {
    val message = receiveMessage[position]

        /** visibility **/
        holder.itemView.d3p.visibility = INVISIBLE
        holder.itemView.imV_attach.visibility = INVISIBLE
    doAsync{
        val from = message.from[0].toString().split("<")[0]
        val subject = message.subject
        val receivedDate = SimpleDateFormat("MMM dd").format(message.receivedDate)
        val content = message.content.toString()
        val seen = message.flags.toString()

        /** unchangeable **/
        holder.itemView.dateTime.text = receivedDate
        holder.itemView.mailSender.text = from
        holder.itemView.subjectTxt.text = subject
        holder.itemView.bodyTxt.text = content
        when (seen) {
            "\\Seen" -> {
                holder.itemView.d3p.visibility = View.INVISIBLE
            }
            "\\Flagged" -> {
                holder.itemView.star.setImageDrawable(
                    ContextCompat.getDrawable(
                        context,
                        R.drawable.ic_star_border
                    )
                )
                holder.itemView.star.setColorFilter(
                    ContextCompat.getColor(
                        context,
                        R.color.icon_tint_selected
                    )
                )
            }
            "\\Flagged \\Seen" -> {
                holder.itemView.star.setImageDrawable(
                    ContextCompat.getDrawable(
                        context,
                        R.drawable.ic_star_border
                    )
                )
                holder.itemView.star.setColorFilter(
                    ContextCompat.getColor(
                        context,
                        R.color.icon_tint_selected
                    )
                )
                holder.itemView.d3p.visibility = View.INVISIBLE
            }
            "" -> {
                holder.itemView.d3p.visibility = View.VISIBLE
                holder.itemView.star.setImageDrawable(
                    ContextCompat.getDrawable(
                        context,
                        R.drawable.ic_star_border
                    )
                )
                holder.itemView.star.setColorFilter(
                    ContextCompat.getColor(
                        context,
                        R.color.icon_tint_normal
                    )
                )
            }
        }
    }
    holder.itemView.setOnClickListener {
        notifyItemChanged(position)
        eventChange.change(position)
    }
}

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
    val view = LayoutInflater.from(context).inflate(R.layout.mail_reciever_row, parent, false)
    return ViewHolder(view)
}

class ViewHolder(itemView : View) :  RecyclerView.ViewHolder(itemView)

override fun getItemCount(): Int {
    return receiveMessage.size
}
}

this is main page

class MailBox : AppCompatActivity(),EventChanger, NavigationView.OnNavigationItemSelectedListener {


var adapter : mailReceiveAdapter? = null
override fun change(id: Int) {

    H.curRow = id
    startActivity(Intent(this@MailBox,ViewerActivity::class.java))
}

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_mailbox)

    val toolbar: Toolbar = findViewById(R.id.mailBoxToolbar)
    setSupportActionBar(toolbar)
    supportActionBar?.title = "Mail List"

    allMail_recycler.layoutManager = LinearLayoutManager(this@MailBox)

    val drawerLayout: DrawerLayout = findViewById(R.id.drawer_layout)
    val navView: NavigationView = findViewById(R.id.nav_view)
    val toggle = ActionBarDrawerToggle(
        this,
        drawerLayout,
        toolbar,
        R.string.navigation_drawer_open,
        R.string.navigation_drawer_close
    )
    drawerLayout.addDrawerListener(toggle)
    toggle.syncState()
    navView.setNavigationItemSelectedListener(this@MailBox)

    test()
}
fun test(){
    val dialog = ProgressDialog(this@MailBox)
    dialog.setCancelable(false)
    dialog.setMessage("Loading...")
    dialog.show()
    doAsync {
        val props = Properties()
        props.setProperty("mail.debug", "true")
        props.setProperty("mail.imap.port", "143")
        props.setProperty("mail.imap.ssl.enable", "true")
        props.setProperty("mail.imap.socketFactory.port", "993")

        val session =
            Session.getDefaultInstance(props, authenticator(H.currentUser!!.DC_EMAIL, H.currentUser!!.NO_MAILPWD))
        val store = session.getStore("imaps")
        store.connect(H.currentUser!!.DC_MAILSERVER, H.currentUser!!.DC_EMAIL, H.currentUser!!.NO_MAILPWD)
        val emailFolder = store.getFolder("Inbox")
        emailFolder.open(Folder.READ_ONLY)
        val messages: Array<Message> = emailFolder.messages

        activityUiThread {
            val adapter = testAdapter(this@MailBox,messages,this@MailBox)
            allMail_recycler.adapter = adapter
            dialog.dismiss()
        }
    }
}
override fun onBackPressed() {
    val drawerLayout: DrawerLayout = findViewById(R.id.drawer_layout)
    if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
        drawerLayout.closeDrawer(GravityCompat.START)
    } else {
        super.onBackPressed()
    }
}

}

I face this

cardView with multiThreading (doAsync)

Mail Function is giving false return in PHP

$
0
0

I have tried sending email from a basic html form by php mail() function and It has given me false return

Code:
<?php 
if(isset($_POST['submit'])){
        $title = $_POST['title'];
        $name = $_POST['first_name'];
        $name1 = $_POST['last_name']; 
        $phone = $_POST['phone'];
        $email = $_POST['email'];
        $company=$_POST['lead_object'];
        $skype= $_POST['skype_id'];
        $to = 'himanshu@webkidukan.com';
        $subject = 'Advertiser Form Details';
        $from = 'ssing648@gmail.com';

        // To send HTML mail, the Content-type header must be set
        $headers  = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

        // Create email headers
        $headers .= 'From: '.$from."\r\n".
            'Reply-To: '.$from."\r\n" .
            'X-Mailer: PHP/' . phpversion();

        // Compose a simple HTML email message
        $message = '<html><body>';
        $message .= '<h1 style="color:#f40;">Hi Sir</h1>';
        $message .= '<p style="color:#080;font-size:18px;">Details of Advertiser Form</p>';
        $message .= '<p style="color:#080;font-size:18px;"><?php $title . "" . $name . "" . "?>wrote the following:"<?php . "\n\n" . $name . "\n\n" . $name1 . "\n\n" .$email . "\n\n" .$phone . "\n\n" .$company. "\n\n" .$skype. "\n\n"?> </p>';
        $message .= '</body></html>';
        $t = mail($to, $from, $message, $headers,$subject);
        var_dump($t);exit;
        if ($t) {
            echo "Mail Sent. Thank you " . $name . " .We will contact you shortly.";

        }else{
           echo "Failed to send email. Please try again later";
        }

    echo "<script type='text/javascript'>alert('Thanks for filling out our form! We will look over your message and get back to you soon.')</script>";    

    echo "<script> window.location.href = 'advertiser.php';</script>";  
}

 ?>

I have this issue in three forms together , hence posting one for the understanding the mistake, that I am doing. Can anyone of you help me with the same.Or should I go for the SMTP mail option.Also I am sending the form details in mail to the user.So also check that the way to send the flyer is right or not.


Why imaplib.search() always get all mail in INBOX?

$
0
0

My code just like this:

my_conn = imaplib.IMAP4_SSL(port=993, host=host)
my_conn.login(account, passwd)
my_conn.select('INBOX')
typ, data_bytes = my_conn.search(None, '(FROM "myfriend@myfriend.com")')
data = data_bytes.decode('utf-8')
data = data.split('')
print(len(data))

It prints "1963", but there is 1963 e-mails in my in-box, and my friend only sent within 20 mails to me. So why function imaplib.search() didn't filte the mail? And how to make it work?
Thank in advance!

Using Office 365 with anonymous authentication

$
0
0

I have a server Windows 2019 running and have set up the SMTP server in IIS.

  • I have the fqdn of my server server.domain.local
  • On the general tab I have my local IP address.
  • On the Access tab -> authentication -> Anonymous authentication is enabled.
  • On the Delivery tab -> Advanced -> I have my FQDN and the smart host (mx record) filled in with the Office 365 address.
  • On the Delivery tab -> outbound security -> I used anonymous access and basic authentication (didnt'make any difference). Also enabled TLS encrytpion.
  • Have added the local IP address to the list which is allowed to relay.
  • Have made a connector with the public IP address of the server in Office 365.
  • Disabled the limit of connections.
  • Used TCP port 587 and 25
  • Firewall is off

The mails are picked up by the SMTP server, but they are stored in the Queue folder.

Received: from CLOUDAPP ([10.0.0.4]) by CLOUDAPP.domainname.local with Microsoft SMTPSVC(10.0.17763.1);
   Wed, 27 Nov 2019 18:23:53 +0100
MIME-Version: 1.0
From: "Sender"<sender@sender.com>
To: receiver@receiver.com
Date: 27 Nov 2019 18:23:53 +0100
Subject: Ontvangst: 11910005
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Return-Path: sender@sender.com
Message-ID: <CLOUDAPPXvpFVjCRGry00000003@CLOUDAPP.domainname.local>
X-OriginalArrivalTime: 27 Nov 2019 17:23:53.0611 (UTC) FILETIME=[711A55B0:01D5A547]

<HEAD><base href=3D"http://localhost/webapp/" /></HEAD>

In the SMTP log I see

Fields: date time c-ip cs-username s-sitename s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status sc-win32-status

sc-bytes cs-bytes time-taken cs-version cs-host cs(User-Agent) cs(Cookie) cs(Referer) 2019-11-27 17:23:53 10.0.0.4 CLOUDAPP SMTPSVC1 CLOUDAPP 10.0.0.4 0 EHLO - +CLOUDAPP 250 0 216 13 0 SMTP - - - - 2019-11-27 17:23:53 10.0.0.4 CLOUDAPP SMTPSVC1 CLOUDAPP 10.0.0.4 0 MAIL - +FROM: 250 0 48 35 0 SMTP - - - - 2019-11-27 17:23:53 10.0.0.4 CLOUDAPP SMTPSVC1 CLOUDAPP 10.0.0.4 0 RCPT - +TO: 250 0 36 33 0 SMTP - - - - 2019-11-27 17:23:53 10.0.0.4 CLOUDAPP SMTPSVC1 CLOUDAPP 10.0.0.4 0 DATA - 250 0 141 320 46 SMTP - - - - 2019-11-27 17:25:02 10.0.0.4 CLOUDAPP SMTPSVC1 CLOUDAPP 10.0.0.4 0 QUIT - CLOUDAPP 240 69265 77 4 0 SMTP - - - -

Is it possible to make the sending of e-mails working without authentication? I have tried IIS reset, tried to restart the SMTP service, but none of them were the solution.

Setting up PHPMailer with Office365 SMTP

$
0
0

I am attempting to set up PHPMailer so that one of our clients is able to have the automatically generated emails come from their own account. I have logged into their Office 365 account, and found that the required settings for PHPMailer are:

Host: smtp.office365.com
Port: 587
Auth: tls

I have applied these settings to PHPMailer, however no email gets sent (The function I call works fine for our own mail, which is sent from an external server (Not the server serving the web pages)).

"host"      => "smtp.office365.com",
"port"      => 587,
"auth"      => true,
"secure"    => "tls",
"username"  => "clientemail@office365.com",
"password"  => "clientpass",
"to"        => "myemail",
"from"      => "clientemail@office365.com",
"fromname"  => "clientname",
"subject"   => $subject,
"body"      => $body,
"altbody"   => $body,
"message"   => "",
"debug"     => false

Does anyone know what settings are required to get PHPMailer to send via smtp.office365.com?

Missing variable name while trying to send sheet row data to GmailApp; Javascript/Google App script

$
0
0

Still on a learning curve here. I am trying to get data from a google sheet and send the data Gmail app but getting Missing variable name error. This is what I have tried for the last 2 hours and I will appreciate help in structuring the code to work.

function emailTheLastRow(){
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getActiveSheet();  
   var range = sheet.getRange("AO2:AO"+sheet.getLastRow()).getValues();
  var searchString = "1";

  for (var i = 0; i<range.length; i++) {
  if(range[i][0] == searchString) {
   var lastRow = sheet.getRange(2+i,1,1,41).getValues();
     var data = {    
       'email':lastRow[0][1],
       'project':lastRow[0][2],
       'client':lastRow[0][3],
       'sdate':lastRow[0][4],
       'edate':lastRow[0][5],
       'loe':lastRow[0][7],
     };

      GmailApp.sendEmail("test@gmail.com", "Project", "A new project has been created with the following details: " + data());

    }
  }
}

Thunderbird: how to make a filter for archiving only old mail

$
0
0

I'm using Thunderbird since a while, now I have a couple hundred thousand email I want to archive sort in many folders, my need is to make a filter that, when archiving a whole folder, keeps the last month of mail.

My filters.dat has this:

name="Old Mail"
enabled="yes"
type="144"
action="Stop execution"
condition="AND (age in days,is less than,30)"

This filter simply has no effect: what i expect is that all messages older than 30 days are archived while newer are kept but in my case archives all the mails.

Fix email address error from email parser

$
0
0

Recently i discovered that the email parser i'm using is not giving me a perfect email address.

Here's some example:

@.comea (it should be .com)
@.sgor (it should be .sg)
@.asiaplease (it should be .asia)
@.com.sg.data (it should be .com.sg)
@.netr (it should be .net)

Is there any code snippet in php to fix this issue? Appreciate your kind help and thank you in advance!

Parsing outlook .msg files with python

$
0
0

Looked around and couldn't find a satisfactory answer. Does anyone know how to parse .msg files from outlook with Python?

I've tried using mimetools and email.parser with no luck. Help would be greatly appreciated!


Images have a space between cells on Outlook email app

$
0
0

So I am creating a banner at the top of an email that is two separate images and links. On the iPhone mail app there exists no gap between the images. However on the Outlook moblile app, there exists a white gap of a few pixels. What is the best way to guarantee that these images remain touching each other?

<table align="center" border="0" cellpadding="0" cellspacing="0" style="max-width:600px;" width="100%">
<tbody>
    <tr>
        <td style="line-height:0;" width="300"><img src="image1.jpg" alt="" align="left" />
        </td>
        <td style="line-height:0;" width="300"><img src="image2.jpg" alt="" align="right" />
        </td>
    </tr>
</tbody>

Excel VBA, embedded a chart via HTML into an email but the conditional formatting has gone

$
0
0

Through excel VBA I have embedded a table of data via HTML into the body of an email. All works fine except the conditional formatting dissappears when it is in the email.

Any help would be appreciated, here is the relevant code.

Dim TableRangeB As Object
Set TableRangeB = Sheet10.Range("P1:V"& RegionTableLen).SpecialCells(xlCellTypeVisible)

On Error Resume Next
With OutlookMessage
    .To = EmailListNames
    .CC = EmailListNames2
    .BCC = ""
    .Subject = DepotThatIsBeingChecked & " Route&Drop KPIs"
    .HTMLBody = StringText & "<br>"& RangeToHTML(TableRangeB)
    .Attachments.Add TempFilePath & TempFileName & FileExtStr
    .Display

Facing connection reset and timeout error while sending email through sendmail via smtp. How to fix this?

$
0
0

i've got a problem configuring sendmail to send email through smtp. My goal is to have the ability to send mail from a php application using smtp. I've to migrate to a new server some old legacy php application which use the standard "mail()" php function, and i can't modify the code, so i can't just use something like "phpMailer" or "pear mail package" instead.

I've followed this guide (venice answer) sendmail: how to configure sendmail on ubuntu? , and watched many other that say the same thing...

I've already installed and configured sendmail, and it works fine for sending local mail (if i send an email to root@localhost, i receive it correctly) but not for sending "normal" email.. Every time i send an email i've got these error in the mail.log file:

Nov 26 15:38:17 compute-prod-main-2-vm sm-mta[22434]: xAQFcH3g022434: from=<Mattia@compute-prod-main-2-vm.europe-west1-b.c.fine-command-242712.in>, size=418, class=0, nrcpts=1, msgid=<201911261538.xAQFcHXA022433@compute-prod-main-2-vm.europe-west1-b.c.fine-command-242712.in>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 26 15:38:17 compute-prod-main-2-vm sendmail[22433]: xAQFcHXA022433: to=mattiabonzi@libero.it, ctladdr=Mattia (1002/1005), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30105, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (xAQFcH3g022434 Message accepted for delivery)
Nov 26 15:38:33 compute-prod-main-2-vm sendmail[22444]: xAQFcXYx022444: from=Mattia, size=80, class=0, nrcpts=1, msgid=<201911261538.xAQFcXYx022444@compute-prod-main-2-vm.europe-west1-b.c.fine-command-242712.in>, relay=root@localhost
Nov 26 15:38:33 compute-prod-main-2-vm sm-mta[22445]: xAQFcXOb022445: from=<Mattia@compute-prod-main-2-vm.europe-west1-b.c.fine-command-242712.in>, size=469, class=0, nrcpts=1, msgid=<201911261538.xAQFcXYx022444@compute-prod-main-2-vm.europe-west1-b.c.fine-command-242712.in>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 26 15:38:33 compute-prod-main-2-vm sendmail[22444]: xAQFcXYx022444: to=mattiabonzi@openworks.it, ctladdr=Mattia (1002/1005), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30080, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (xAQFcXOb022445 Message accepted for delivery)
Nov 26 15:38:37 compute-prod-main-2-vm sm-mta[21588]: xAQFXbC8021586: timeout waiting for input from authsmtp.securemail.pro during client greeting
Nov 26 15:38:37 compute-prod-main-2-vm sm-mta[21588]: xAQFXbC8021586: to=<mattiabonzi@libero.it>, delay=00:05:00, xdelay=00:05:00, mailer=relay, pri=120418, relay=authsmtp.securemail.pro [81.88.48.66], dsn=4.0.0, stat=Deferred: Connection timed out with authsmtp.securemail.pro
Nov 26 15:41:00 compute-prod-main-2-vm sm-mta[21743]: xAQFa0cV021741: timeout waiting for input from authsmtp.securemail.pro during client greeting
Nov 26 15:41:00 compute-prod-main-2-vm sm-mta[21743]: xAQFa0cV021741: to=<mattiabonzi@libero.it>, delay=00:05:00, xdelay=00:05:00, mailer=relay, pri=120418, relay=authsmtp.securemail.pro [81.88.48.66], dsn=4.0.0, stat=Deferred: Connection timed out with authsmtp.securemail.pro
Nov 26 15:42:02 compute-prod-main-2-vm sm-mta[21765]: xAQFb1PN021763: timeout waiting for input from authsmtp.securemail.pro during client greeting
Nov 26 15:42:02 compute-prod-main-2-vm sm-mta[21765]: xAQFb1PN021763: to=<mattiabonzi@libero.it>, delay=00:05:01, xdelay=00:05:01, mailer=relay, pri=120418, relay=authsmtp.securemail.pro [81.88.48.66], dsn=4.0.0, stat=Deferred: Connection timed out with authsmtp.securemail.pro
Nov 26 15:43:06 compute-prod-main-2-vm sm-mta[22415]: xAQFNe4X021461: to=<mattiabonzi@libero.it>, delay=00:19:26, xdelay=00:05:00, mailer=relay, pri=210466, relay=authsmtp.securemail.pro [81.88.48.66], dsn=4.0.0, stat=Deferred: Connection reset by authsmtp.securemail.pro
Nov 26 15:43:06 compute-prod-main-2-vm sm-mta[22415]: xAQFH7gj020614: to=<mattiabonzi@libero.it>, delay=00:25:59, xdelay=00:00:00, mailer=relay, pri=300466, relay=authsmtp.securemail.pro, dsn=4.0.0, stat=Deferred: Connection reset by authsmtp.securemail.pro
Nov 26 15:43:06 compute-prod-main-2-vm sm-mta[22415]: xAQFBfZq020461: to=<mattiabonzi@openworks.it>, delay=00:31:25, xdelay=00:00:00, mailer=relay, pri=300469, relay=authsmtp.securemail.pro, dsn=4.0.0, stat=Deferred: Connection reset by authsmtp.securemail.pro
Nov 26 15:43:06 compute-prod-main-2-vm sm-mta[22415]: xAQEkePb016232: to=<mattiabonzi@openworks.it>, delay=00:56:26, xdelay=00:00:00, mailer=relay, pri=390469, relay=authsmtp.securemail.pro, dsn=4.0.0, stat=Deferred: Connection reset by authsmtp.securemail.pro
Nov 26 15:43:06 compute-prod-main-2-vm sm-mta[22415]: xAQEkfdA016262: to=<mattiabonzi@openworks.it>, delay=00:56:25, xdelay=00:00:00, mailer=relay, pri=390469, relay=authsmtp.securemail.pro, dsn=4.0.0, stat=Deferred: Connection reset by authsmtp.securemail.pro
Nov 26 15:43:06 compute-prod-main-2-vm sm-mta[22415]: xAQEkgiG016272: to=<mattiabonzi@openworks.it>, delay=00:56:24, xdelay=00:00:00, mailer=relay, pri=390469, relay=authsmtp.securemail.pro, dsn=4.0.0, stat=Deferred: Connection reset by authsmtp.securemail.pro
Nov 26 15:43:06 compute-prod-main-2-vm sm-mta[22415]: xAQEkfEJ016252: to=<mattiabonzi@openworks.it>, delay=00:56:25, xdelay=00:00:00, mailer=relay, pri=390469, relay=authsmtp.securemail.pro, dsn=4.0.0, stat=Deferred: Connection reset by authsmtp.securemail.pro

This is what i've initialy added to the sendmail.mc file

define(`SMART_HOST',`authsmtp.securemail.pro')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl

I've made some research and understood that the problem may be the port that sendmail is using for the smtp connection. i've tried to telnet my isp and i'm able to contact it only on port 465, but i cannot find a way to change the port that sendmail is using.

I've tried to add those line, but with no luck:

define(`ESMTP_MAILER_ARGS', `TCP $h 465')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 465')dnl

I've also noticed that one antoher server that i have with sendmal instaled and propely configured is using the mailer esmtp, this installation use insted relay, is that normal?

What i'm doing wrong? Thank yuo in advance, hope that i've listed all the relevant details.

Problem in sending email from php by configuring sendmail.ini & php.ini of XAMPP [duplicate]

$
0
0

This question already has an answer here:

I want to send email from php by configuring php.ini and sendmail.ini of XAMPP.

$sentmail= mail("xxxxxx@gmail.com","Success","Send mail from localhost using PHP");
echo $sentmail ? "email send" : " email send fail";

The [mail function] of php.ini is configured as:

SMTP= smtp.gmail.com
smtp_port= 25
sendmail_from= xxxxxx@gmail.com
sendmail_path= "\"C:\xampp\sendmail\sendmail.exe\" -t"
mail.add_x_header=Off

All other parameters are commented.

The sendmail.ini file is configured as

smtp_server=smtp.gmail.com
smtp_port=25
auth_username=xxxxxxxxxx@gmail.com
auth_password=yyyyyyyy
force_sender=xxxxxxxxxx@gmail.com
error_logfile=error.log
debug_logfile=debug.log
default_domain=localhost
hostname= localhost

All other parameters commented out.

I have already tried some of the answers given here XAMPP Sendmail using Gmail account

What is the problem? I am stuck at this for quite long.

I get email send fail echoed on my php page.

Why by codeigniter email is going to spam folder with full information?

$
0
0

Hi i am using CodeIgniter with PHP technology and i am sending emails from application but emails are being sent in spam folder of recipients.

$this->load->library('email');

$config['protocol'] = 'sendmail';
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';

$this->email->initialize($config);

$this->email->from('aaaa@domain.com', 'MYRegistration');
$this->email->to('abc@domain.com');

$this->email->subject('Congratulation ! You are a User.');
$this->email->message('html code');
$KsbMailStatus = $this->email->send();

This email contains some images and links also because this is a registration emails.

Viewing all 29743 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>