---
title: "Mail needs authentication"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/82279-mail-needs-authentication"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "Boogaloo"
published: "2003-07-18T14:13:51.000Z"
updated: "2003-07-19T07:59:58.000Z"
replies: 2
views: 244
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/82279-mail-needs-authentication"
---

# Mail needs authentication

## #1 — Boogaloo, 2003-07-18T14:13Z

Får följande fel när jag försöker skicka mail med php, följande kod:

```php
$email = "mattias@ctrlalt.com";

//if(eregi("googlebot",$_SERVER['HTTP_USER_AGENT'])) { 
mail($email, "Googlebot detected","Google has crawled : ".$_SERVER['REQUEST_URI']);
```

 

Och får följande fel:
Warning: mail(): SMTP server response: 503 This mail server requires authentication. Please check your mail client settings. in testMail.php on line 6

Vet någon hur man skickar mail, eller ändrar i php.ini så att jag "loggar in" innan jag skickar?

Permalänk: https://www.webforum.nu/p/82279

## #2 — stevenet, 2003-07-18T19:37Z

Med hjälp av imap_open och imap_mail kan du göra detta, om du nu har stöd för imap, vill säga.
<http://se.php.net/manual/en/function.imap-open.php>
<http://se.php.net/manual/en/function.imap-mail.php>

Permalänk: https://www.webforum.nu/p/1114389

## #3 — Boogaloo, 2003-07-19T07:59Z

imap_mail

Har stöd för imap_mail och har använt det förrut men jag får samma fel på imap_mail som mail.

Permalänk: https://www.webforum.nu/p/1114607

---

Tråden på webben: https://www.webforum.nu/amne/php/82279-mail-needs-authentication
