You can write some code that would iterate "img" elements and appends the server url, something like this:
[FunctionParameter]
XhtmlDocument Content { get; set; }
....
// Code that fixes urls
string serverUrl = new Composite.Core.UrlBuilder(Request.Url.AbsoluteUri).ServerUrl;
var imageTags = Content.Root.Elements().Where(e => e.Name == "img").ToList();
foreach(var img in imageTags) {
string src = (string) img.Attribute("src");
if(src.StartsWith("/media")) {
img.Attribute("src").Value = serverUrl + src;
}
}
// ...
string emailhtml = Content.ToString();