Send mail (ask questions)

Phoca Cart - complex e-commerce extension
Serebro200
Phoca Member
Phoca Member
Posts: 45
Joined: 26 Aug 2018, 17:23

Send mail (ask questions)

Post by Serebro200 »

Hello, I want send a letter with a question from the site. But I get error:

SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Sender address rejected: not owned by authorized user 1706903798-cuiC0A6Ona60-aBQDC1Cn SMTP code: 550 Additional SMTP info: 5.7.0
SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Sender address rejected: not owned by authorized user 1706903798-cuit066Or4Y0-BpRaAKHq SMTP code: 550 Additional SMTP info: 5.7.0

In global JOOMLA SMTP send is ok
Serebro200
Phoca Member
Phoca Member
Posts: 45
Joined: 26 Aug 2018, 17:23

Re: Send mail (ask questions)

Post by Serebro200 »

Image
Serebro200
Phoca Member
Phoca Member
Posts: 45
Joined: 26 Aug 2018, 17:23

Re: Send mail (ask questions)

Post by Serebro200 »

This error is SMTP Yandex...

https://www.phoca.cz/apis/2-phocacart/7 ... ail#source

if (isset($post2['email']) && $post2['email'] != '') {
$mailfrom = $post2['email'];
} else {
$mailfrom = $rows[0]->email;
}

You need to add a line:

$mailfrom = $app->getCfg('mailfrom');

when sending mail, the component PC specifies the user's address as the sender's address, which he entered when preparing and sending the message
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Send mail (ask questions)

Post by Jan »

Hi, thank you for the info,

I plan to do similar as it is used in Phoca Guestbook:

$mailFromAdmin = $rows[0]->email;

$mailFromConfig = Factory::getApplication()->get('mailfrom', '');
if ($mailFromConfig != '' && Joomla\CMS\Mail\MailHelper::isEmailAddress($mailFromConfig)) {
$mailFromAdmin = $mailFromConfig;
}
If you find Phoca extensions useful, please support the project
Post Reply