Still having mail issues with cross contamination I suppose you can call it.

A little while ago I raised an issue with mail being seen in my sent box, from emails that seem to be unexplainable. Today I came across something that is even more unexplainable.

The following is a snippet of an interceptor that is called when a page is not found, or en event is not known. Now there is no way that this interceptor can be run manually, and it is also evident that the contents of the email indicates that it came from my site / application. But the strange thing is that email address is not the email address that I am using to send the email with, and I have also attached this below as well.

My question is (and this is a ContentBox website) but I am raising it here, because I can’t see how this can be happening from the code I have.

component extends=“coldbox.system.Interceptor” singleton {

property name=“settingService” inject=“id:settingService@cb”;

property name=“mailService” inject=“coldbox:plugin:MailService”;

//------------------------------------------------------------------------------------------------

//------------------------------------------------------------------------------------------------

private void function processNotFound(event, interceptData) {

var responseMail = “”;

var settings = settingService.getAllSettings(asStruct=true);

var mail = mailservice.newMail(to = “andrews@andyscott.id.au”,

from = settings.cb_site_outgoingEmail,

subject = “Unknown route/event has been detected”,

type = “html”,

server = settings.cb_site_mail_server,

username = settings.cb_site_mail_username,

password = settings.cb_site_mail_password,

port = settings.cb_site_mail_smtp,

useTLS = settings.cb_site_mail_tls,

useSSL = settings.cb_site_mail_ssl);

savecontent variable=“responseMail” {

writeDump(cgi);

writeDump(interceptData);

}

mail.setBody( responseMail );

mailService.send( mail );

}

}

And the header and sending email below shows there is something wrong. The bold sections below is NOT the email address that is sending this email, and on top of that I am using secured credentials, username / password etc to connect and send via Google Apps. I am at a serious loss to explain how this code can end up in my sent box with a different email address than I told it to send with.

Delivered-To: andrews@andyscott.id.au

Received: by 10.68.223.136 with SMTP id qu8csp10441pbc;

Wed, 30 Jan 2013 03:39:39 -0800 (PST)

X-Received: by 10.50.179.100 with SMTP id df4mr3464339igc.60.1359545978690;

Wed, 30 Jan 2013 03:39:38 -0800 (PST)

Return-Path: siteadmin@nervstudios.co.za

Received: from mail-ia0-x22c.google.com (mail-ia0-x22c.google.com [2607:f8b0:4001:c02::22c])

by mx.google.com with ESMTPS id c4si5068186igq.5.2013.01.30.03.39.38

(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);

Wed, 30 Jan 2013 03:39:38 -0800 (PST)

Received-SPF: neutral (google.com: 2607:f8b0:4001:c02::22c is neither permitted nor denied by best guess record for domain of siteadmin@nervstudios.co.za) client-ip=2607:f8b0:4001:c02::22c;

Authentication-Results: mx.google.com;

spf=neutral (google.com: 2607:f8b0:4001:c02::22c is neither permitted nor denied by best guess record for domain of siteadmin@nervstudios.co.za) smtp.mail=siteadmin@nervstudios.co.za

Received: by mail-ia0-f172.google.com with SMTP id u8so2186655iag.31

for andrews@andyscott.id.au; Wed, 30 Jan 2013 03:39:38 -0800 (PST)

X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;

d=google.com; s=20120113;

h=x-received:date:from:to:message-id:subject:mime-version

:content-type:content-transfer-encoding:x-mailer:x-gm-message-state;

bh=cpCHgtBps1jEJ72kIbs1/1xTIgxeRFszJT+8ZZCSIE8=;

b=bvoL1u2aN0fQpay1IromkqpjaBtYkL4gQE9PtOhWswKe10yRkJagfRfoWrllVKhxvT

7T67x124kQ30AE4j2FMOCgFtRAYJ9nXZwxKt9MzPMfxhWVj8UHn3VUO8NDH+N7LSKip2

e3VP84dTlxIDqT71xvWpgcut73Sd3boxjxX2onT5fo87e2IhonUb/XIRRSIowaR2u8bY

83m1gNe7SL8WbJd6B5YjLFJTM/fYcKeDMaW30/wzuhpjd6i3YcTeMHstmmFbPxrepBoN

Sp6c7Kvfj6CvDiHXD8vE49PXCnIpamDYLdwQ+O4uJ/Xs+ECsqp0kgXbMmPg1vDQsm1Nj

e7Fg==

X-Received: by 10.50.91.230 with SMTP id ch6mr3247975igb.92.1359545978113;

Wed, 30 Jan 2013 03:39:38 -0800 (PST)

Return-Path: siteadmin@nervstudios.co.za

Received: from ntc20 (securec20.ezhostingserver.com. [184.175.109.106])

by mx.google.com with ESMTPS id px5sm5529749igc.0.2013.01.30.03.39.35

(version=TLSv1 cipher=RC4-SHA bits=128/128);

Wed, 30 Jan 2013 03:39:36 -0800 (PST)