Avatar of willsavage
willsavage
 asked on

mail function issues - plesk php

Hello, firstly, I am not a wiz at this so please keep things simple and apologies if even the question makes no sense! Here goes...

I have a site running on a virtual dedicated server running windows server 2003 and plesk.

The site is in php and has a rostering system. When a logged in user whose email address is a company one (same domain name as the website) it returns this error...

Warning: mail() [function.mail]: SMTP server response: 550 Requested action not taken: mailbox unavailable or not local in C:\Inetpub\vhosts\eventparamedics.co.uk\httpdocs\objects\class.Mail.php on line 47

Any advice on where I should be looking to fix this?

Finally, the whole process is confused slightly by the fact that the v-ded server is with goDaddy and all email is handled by server101.

Any advise on this would be great.

Thanks

Will
Web ServersEmail ServersPHP

Avatar of undefined
Last Comment
orkinoks

8/22/2022 - Mon
ritetek

Yeah, this actually isn't JUST a php issue, it's just a hosting issue in general.  I'm not sure if this would work since I'm not a hosting expert, but are you using a "from" header?  If so, you might try changing it to something OTHER than an email at your domain, maybe only if to address is one that IS at your domain.  Again, I'm not sure what you are doing at the moment with the actual code, so I'm not sure if that would even work.  
zstapic

Hello, try this:



function sendActivationCode($email, $authorisationCode)
	{
		$to = $email;
		$subject = "Registracija na Callidus Elearning System - Ivan `vogor";
		$txt = 
		"
		Dobro doali na sustav za elektroni
ko u
enje Callidus!
		
		Da bi dovraili registraciju na stranice http://arka.foi.hr/~isvogor/callidus potvrdite klikom na slijedei link:
		
		http://arka.foi.hr/~isvogor/callidus/activation.php?aktivacija=$authorisationCode
		
		Srda
an pozdrav,
		Ivan `vogor
		";
		$headers = 'From: <isvogor@foi.hr>' . "\r\n";
 
		if(mail($to, $subject, $txt, $headers)) 
			return true;
		else 
			return false;
	}

Open in new window

willsavage

ASKER
Thanks for the advise. I have an update. The chaps at goDaddy support think it is because my DNS is setup incorrectly so it is looking on my server for email addresses when I am actually managing mail from my domain registrar.

I will try this DNS change and if it is a no go I'll try these suggested solutions.

Thanks a lot

Will
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
orkinoks

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
willsavage

ASKER
I think that will be it, any suggestions where I will be able to find the IP for my mailserver? I am using server101 who don't seem to give you direct access to anything! Is it the ones listed here ending in 213 and 210?

http://www.robtex.com/dns/server101.com.html

Cheers...

Will
orkinoks

Yes,
from the links you have sent, it looks like that.
Try one of those Ip addresses, don't forget to disable the mail server of domain in plesk, if the IP's don't work you better open a ticket to your mail service provider for MX IP's.

good luck.