umbraco.library:SendMail Options
thahammer
Posted: Monday, February 25, 2008 2:13:30 PM

Rank: Aficionado

Joined: 8/28/2007
Posts: 129
Location: Bavaria
Hello

i just tried to send an Email with an Macro.

<xsl:variable name="smtpresult" select="umbraco.library:SendMail('bla@bla.de', '$sendto', 'Testmail', '$htmlmail', 'true')"/>

Everything looked fine, and after SendMail i get my Resolved text, but i never get the Mail?

The variable Sendto is my personal EMail Adresse!
htmlmail is just for Testing a peace of Text.

So on of my Question is: Is it enough just to write the Line above to send an Mail from umbraco?

I Love umbraco
drobar
Posted: Monday, February 25, 2008 2:40:59 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,698
Location: KY, USA
Hi, Markus,

Look in the web.config and double-check that the following line specifies the IP or domain name for your email server.

<add key="umbracoSmtpServer" value="127.0.0.1"/>

By default, it is set to 127.0.0.1 (the local server), but some machines either don't have email services installed/activated or they are mis-configured and don't actually send email.

It is best to set the umbracoSmtpServer value to your main email server by IP address or name (mail.example.com).

If you've done that and emails still aren't going through, look at the email server's logs to see what error is being generated.

cheers,
doug.



MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
thahammer
Posted: Monday, February 25, 2008 2:43:45 PM

Rank: Aficionado

Joined: 8/28/2007
Posts: 129
Location: Bavaria
Thanks for that Information! I will tried this. :)

I Love umbraco
thahammer
Posted: Monday, February 25, 2008 3:14:13 PM

Rank: Aficionado

Joined: 8/28/2007
Posts: 129
Location: Bavaria
Douglas Robar wrote:

Hi, Markus,

Look in the web.config and double-check that the following line specifies the IP or domain name for your email server.

<add key="umbracoSmtpServer" value="127.0.0.1"/>

By default, it is set to 127.0.0.1 (the local server), but some machines either don't have email services installed/activated or they are mis-configured and don't actually send email.

It is best to set the umbracoSmtpServer value to your main email server by IP address or name (mail.example.com).

If you've done that and emails still aren't going through, look at the email server's logs to see what error is being generated.

cheers,
doug.




Both, IP and Name of the Emailserver have the same Result. An Server Error!

I Love umbraco
drobar
Posted: Monday, February 25, 2008 3:23:49 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,698
Location: KY, USA
What was the error?

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
thahammer
Posted: Monday, February 25, 2008 3:26:35 PM

Rank: Aficionado

Joined: 8/28/2007
Posts: 129
Location: Bavaria
Server Error in '/' Application.


Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>




I Love umbraco
mortenbock
Posted: Monday, February 25, 2008 3:52:42 PM

Rank: Addict

Joined: 7/19/2006
Posts: 790
Location: Århus, Denmark
You have quotes around your variables. I think that may be the problem. Try this:

Code:

<xsl:variable name="smtpresult" select="umbraco.library:SendMail('bla@bla.de', $sendto, 'Testmail', $htmlmail, 1)"/>




Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

drobar
Posted: Monday, February 25, 2008 4:07:40 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,698
Location: KY, USA
Good eyes, Morten! That will definitely help.

If you still get errors, set the following in your web.config so you can see the actual error being generated. (note that "Off" has a capital "O")

Code:
<customErrors mode="Off"/>


cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
thahammer
Posted: Monday, February 25, 2008 4:19:23 PM

Rank: Aficionado

Joined: 8/28/2007
Posts: 129
Location: Bavaria
Douglas Robar wrote:

Good eyes, Morten! That will definitely help.

If you still get errors, set the following in your web.config so you can see the actual error being generated. (note that "Off" has a capital "O")

Code:
<customErrors mode="Off"/>


cheers,
doug.


OK, i do this Things right now:

http://aspnet.4guysfromrolla.com/articles/072606-1.aspx

Added the User Data to Web.config.
Set Error to Off

And i get another Error Message right now.

Quote:

Server Error in '/' Application.


Der Server hat eine oder mehrere Empfängeradressen zurückgewiesen. Die Serverantwort lautet: 550 5.1.1 User unknown

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Der Server hat eine oder mehrere Empfängeradressen zurückgewiesen. Die Serverantwort lautet: 550 5.1.1 User unknown


Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


I Love umbraco
thahammer
Posted: Monday, February 25, 2008 4:32:58 PM

Rank: Aficionado

Joined: 8/28/2007
Posts: 129
Location: Bavaria
OK, i tried something and i m wondering!

I make the Receipts EMail the same as the Sender and there is noch Error no more?
That makes no sense for me?

I Love umbraco
mortenbock
Posted: Monday, February 25, 2008 5:35:56 PM

Rank: Addict

Joined: 7/19/2006
Posts: 790
Location: Århus, Denmark
Some hosting companies do not allow you sending mail to users that are not connected to their own servers. So maybe it is the SMTP server telling you that you are not allowed to send email to users outside your own domain?

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

thahammer
Posted: Tuesday, February 26, 2008 9:06:27 AM

Rank: Aficionado

Joined: 8/28/2007
Posts: 129
Location: Bavaria
Another Question after a short Night! :blush:

What does this mean. Or does anyone have a good Link to this?

Quote:

xmlns:domain.de ="urn:Domain.de"


I Love umbraco
thahammer
Posted: Tuesday, February 26, 2008 1:53:20 PM

Rank: Aficionado

Joined: 8/28/2007
Posts: 129
Location: Bavaria
Morten Bock wrote:

Some hosting companies do not allow you sending mail to users that are not connected to their own servers. So maybe it is the SMTP server telling you that you are not allowed to send email to users outside your own domain?


We finally found the Problem. It was the Web.config!
We made some mistakes yesterday in here.

I Love umbraco
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.